Jquery $(this) 表示什么
ul,li{margin:0;padding:0}
#scrollDiv{width:300px;height:50px;line-height:25px;border:#ccc 1px solid;overflow:hidden}
#scrollDiv li{height:50px;padding-left:10px;}
function AutoScroll(obj){
$(obj).find("ul:first").animate({
marginTop:"-50px"
},500,function(){
$(this).css({marginTop:"0px"}).find("li:first").appendTo(this);
});
}
$(document).ready(function(){
setInterval('AutoScroll("#scrollDiv")',1000)
});
这是公告标题的第一行
dfgsdfgsdfgsdfgs
这是公告标题的第二行
dfgsdfgsdfgsdfgs
这是公告标题的第三行
dfgsdfgsdfgsdfgs
这是公告标题的第四行
dfgsdfgsdfgsdfgs
这是公告标题的第五行
这是公告标题的第六行
这是公告标题的第七行
这是公告标题的第八行
人气:252 ℃ 时间:2020-06-12 03:44:41
解答
$(obj).find("ul:first").animate({marginTop:"-50px"},500,function(){$(this).css({marginTop:"0px"}).find("li:first").appendTo(this);});其中this代表 查找的目标ul 对象 ,但这是javascript对象,它是不能直接使...
推荐
猜你喜欢
- It's reported that by the end of this month the output of TV sets in this factory----by about 10%
- 有甲乙丙三人,甲每小时行3km,乙每小时行4km,丙每小时行5km,某日甲下午1点,乙下午2点,丙下午3点从同地
- 已知:关于x的一元二次方程mx²-(3m+2)x+2m+2=0(m>0).求证:方程有两个不相等的实数根
- 什么叫做相反意义的量?我看过有的书写的是 意义相反还不行,必须要有数量 .
- 两条直线的夹角的大小是否等于它们的方向向量夹角的大小
- 1.在国际单位制中,时间的主单位是_______,符号是_________.常用的质量的单位有________,__________,__________.
- 书名号,双引号之间不需要用其它标点符号,
- 1,需要制得56kg含杂质 3%的生铁需要含 fe2o3的 赤铁矿为多少千克?