Template:Kyoto/myScroll

From 2012.igem.org

(Difference between revisions)
Line 8: Line 8:
         var off_top = parent.offset().top;
         var off_top = parent.offset().top;
         var _top = scroll_top - off_top;
         var _top = scroll_top - off_top;
-
        if(_top > 0) {
+
        if(_top > 0) {
-
        element.css("top",_top+"px");
+
            element.css("top",_top+"px");
-
        } else if (_top < 0) {
+
        } else if (_top < 0) {
-
        element.css("top","0px");
+
            element.css("top","0px");
-
        }
+
        }
     };
     };
}</script>
}</script>
</html>
</html>

Revision as of 01:45, 26 September 2012