jquery文字上下滚动的实现方法_Javascript教程-查字典教程网
jquery文字上下滚动的实现方法
jquery文字上下滚动的实现方法
发布时间:2016-12-30 来源:查字典编辑
摘要:复制代码代码如下://上下滚动vartextRoll=function(){$('#noticep:last').css({'height'...

复制代码 代码如下:

//上下滚动

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)

});

});

相关阅读
推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
  • 大家都在看
  • 小编推荐
  • 猜你喜欢
  • 最新Javascript教程学习
    热门Javascript教程学习
    编程开发子分类