Difference between revisions of "Template:Toronto/Javascript"

Line 23: Line 23:
 
$(window).scroll(function() {
 
$(window).scroll(function() {
  
prop= ($(window).scrollTop() + $(window).height()/$(document).height());
+
prop= (($(window).scrollTop() + $(window).height())/$(document).height());
     $("#nugget").css('opacity') = prop.toString();;
+
     $("#nugget").css('opacity') = (1-prop).toString();
     $(".testtext").css('opacity') = (1-prop).toString();;
+
     $(".testtext").css('opacity') = (prop).toString();
  
 
}
 
}

Revision as of 20:18, 8 August 2016