Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- var name = "#citybox";
- var menuYloc = null;
- $(document).ready(function(){
- menuYloc = parseInt($(name).css("top").substring(0,$(name).css("top").indexOf("px")))
- $(window).scroll(function () {
- offset = menuYloc+$(document).scrollTop()+"px";
- $(name).animate({top:offset},{duration:1000,queue:false});
- });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement