比熊情感
您的当前位置:首页jQuery(1.3.2)7行代码搞定跟随屏幕滚动的层_jquery

jQuery(1.3.2)7行代码搞定跟随屏幕滚动的层_jquery

来源:比熊情感


代码如下:



jquery.text-effects




$(document).ready(function(){
var menuYloc = $("#test").offset().top;
$(window).scroll(function (){
var offsetTop = menuYloc + $(window).scrollTop() +"px";
$("#test").animate({top : offsetTop },{ duration:600 , queue:false });
});
});



7行代码的跟随屏幕滚动层.




Dev By CssRain.cn
Test ie6+,firefox3.0






显示全文