Team:BIT-China/js/empty.js

From 2013.igem.org

(Difference between revisions)
(Created page with "(function() { var $w = $(window); var $nav = $("#navigation"); var $emp = $('#empty'); $w.scroll(function() { $nav[$w.scroll...")
 
Line 1: Line 1:
-
(function() {
+
(function(){var $w=$(window);var $nav=$("#navigation");var $emp=$('#empty');var $sid=$('#sidebar');$w.scroll(function(){$nav[$w.scrollTop()>106?"addClass":"removeClass"]("fixed");$emp[$w.scrollTop()>106?"addClass":"removeClass"]("fixed");$sid[$w.scrollTop()>106?"addClass":"removeClass"]("fixed");});})();
-
        var $w = $(window);
+
-
        var $nav = $("#navigation");
+
-
        var $emp = $('#empty');
+
-
       
+
-
 
+
-
        $w.scroll(function() {
+
-
            $nav[$w.scrollTop() > 106 ? "addClass" : "removeClass"]("fixed");
+
-
            $emp[$w.scrollTop() > 106 ? "addClass" : "removeClass"]("fixed");
+
-
        });
+
-
 
+
-
 
+
-
})();
+

Latest revision as of 02:24, 26 September 2013

(function(){var $w=$(window);var $nav=$("#navigation");var $emp=$('#empty');var $sid=$('#sidebar');$w.scroll(function(){$nav[$w.scrollTop()>106?"addClass":"removeClass"]("fixed");$emp[$w.scrollTop()>106?"addClass":"removeClass"]("fixed");$sid[$w.scrollTop()>106?"addClass":"removeClass"]("fixed");});})();