jquery文字上下滚动的实现方法
代码如下:
//上下滚动 var textRoll=function(){ $('#notice p:last').css({'height':'0px','opacity': '0'}).insertBefore('#notice p:first').animate({'height':'35px','opacity': '1'}, 'slow', function() { $(this).removeAttr('style');}); } $(function(){ //触发上下文字滚动事件 var roll=setInterval('textRoll()',4000); $("#notice p").hover(function() { clearInterval(roll); }, function() { roll = setInterval('textRoll()', 4000) }); });
相关推荐
angqiuli 2020-05-16
弱思 2020-04-20
nankangren 2019-11-19
jiangbo0 2019-09-08
Luffyying 2016-05-11
hyv 2016-02-19
逆风飞舞0 2015-12-24
xaoyege 2019-06-27
崔博伦一路有你 2014-08-06
nmgxzm00 2014-04-28
itSeven 2012-12-18
83500391 2012-04-19
愚盦 2011-12-03
zhangmingming 2011-09-18
Tomhsfreestyle 2011-08-20
努力的zhiyi 2011-07-15
CXPOwen 2017-10-15
yzxlemon 2017-02-13