Template:Queens Canada/Header

From 2012.igem.org

(Difference between revisions)
Line 735: Line 735:
});
});
</script>
</script>
-
<script type="text/javascript"> // run this code on page load (AKA DOM load)
+
<script type="text/javascript">  
-
 
+
     var scrolltimer;
-
    /* set variables locally for increased performance */
+
-
     var scroll_timer;
+
     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(scroll_timer);
+
         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

up
Control