Template:Queens Canada/Header

From 2012.igem.org

(Difference between revisions)
Line 529: Line 529:
         font-weight: bold;
         font-weight: bold;
         font-size: 3em;
         font-size: 3em;
 +
        opacity: .8;
}
}
#contentmain
#contentmain
Line 731: Line 732:
}, function() {
}, function() {
     $("#menuselector").animate({ left: startleft2 , width: "0px"}, {queue: false});
     $("#menuselector").animate({ left: startleft2 , width: "0px"}, {queue: false});
 +
});
 +
</script>
 +
<script type="text/javascript"> $(function () {
 +
 +
    /* set variables locally for increased performance */
 +
    var scroll_timer;
 +
    var displayed = false;
 +
    var $message = $('#upbutton');
 +
    var $window = $(window);
 +
    var top = $(document.body).children(0).position().top;
 +
 +
    /* react to scroll event on window */
 +
    $window.scroll(function () {
 +
        window.clearTimeout(scroll_timer);
 +
        scroll_timer = window.setTimeout(function () {
 +
            if($window.scrollTop() <= top)
 +
            {
 +
                displayed = false;
 +
                $message.fadeOut(500);
 +
            }
 +
            else if(displayed == false)
 +
            {
 +
                displayed = true;
 +
                $message.stop(true, true).show().click(function () { $message.fadeOut(500); });
 +
            }
 +
        }, 100);
 +
    });
});
});
</script>
</script>
</html>
</html>

Revision as of 18:42, 5 July 2012

up
Control