Template:Queens Canada/Header
From 2012.igem.org
(Difference between revisions)
Line 735: | Line 735: | ||
}); | }); | ||
</script> | </script> | ||
- | <script type="text/javascript"> | + | <script type="text/javascript"> |
- | + | var scrolltimer; | |
- | + | ||
- | var | + | |
var displayed = false; | var displayed = false; | ||
var $message = $('#upbutton'); | var $message = $('#upbutton'); | ||
Line 746: | Line 744: | ||
/* react to scroll event on window */ | /* react to scroll event on window */ | ||
$window.scroll(function () { | $window.scroll(function () { | ||
- | window.clearTimeout( | + | window.clearTimeout(scrolltimer); |
scroll_timer = window.setTimeout(function () { // use a timer for performance | scroll_timer = window.setTimeout(function () { // use a timer for performance | ||
if($window.scrollTop() <= top) // hide if at the top of the page | if($window.scrollTop() <= top) // hide if at the top of the page |
Revision as of 19:08, 5 July 2012
Control