$(function() { var navH = $(".statictr1").offset().top; $(window).scroll(function() { var scroH = $(this).scrollTop(); if (scroH >= navH) { $(".statictr1").css({ "position": "fixed", "top": 0 }); } else if (scroH < navH) { $(".statictr1").css({ "position": "static" }); } })})
Powered BY YouYaX个人自主开发论坛,从2010年10月份开发至今!