A semantic search engine for source code https://bitshift.benkurtovic.com/
You can not select more than 25 topics 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. });