Line 8: | Line 8: | ||
var flag = false; | var flag = false; | ||
− | + | // $(window).scroll(function() { | |
Line 15: | Line 15: | ||
// $(".testtext").delay(500).fadeIn("slow"); | // $(".testtext").delay(500).fadeIn("slow"); | ||
− | + | // document.getElementbyId("nugget").style.opacity="0.5"; | |
− | } | + | //} |
− | + | $(window).scroll(function() { | |
+ | console.log($(window).scrollTop()); | ||
+ | if ($(window).scrollTop() > 1000) { | ||
+ | $("#nugget").fadeOut("slow"); | ||
+ | $(".testtext").delay(500).fadeIn("slow"); | ||
+ | } | ||
+ | else { | ||
+ | $(".testtext").hide(); | ||
+ | $("#nugget").show(); | ||
+ | } | ||
+ | }); | ||
Revision as of 20:09, 8 August 2016