Line 19: | Line 19: | ||
− | + | var prop=0; | |
+ | |||
$(window).scroll(function() { | $(window).scroll(function() { | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | prop= ($(window).scrollTop() + $(window).height()/$(document).height()); | ||
+ | $("#nugget").css('opacity') = prop.toString();; | ||
+ | $(".testtext").css('opacity') = (1-prop).toString();; | ||
+ | |||
+ | } | ||
}); | }); |
Revision as of 20:16, 8 August 2016