A semantic search engine for source code https://bitshift.benkurtovic.com/
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

16 lines
409 B

  1. /*
  2. * @file Implements a parallax effect on the about page.
  3. */
  4. var lastVertPos = $(window).scrollTop();
  5. $(window).scroll(function(e){
  6. var currVertPos = $(window).scrollTop();
  7. var delta = currVertPos - lastVertPos;
  8. $(".bg").each(function(){
  9. $(this).css("top", parseFloat($(this).css("top")) -
  10. delta * $(this).attr("speed") + "px");
  11. });
  12. lastVertPos = currVertPos;
  13. });