当前位置: 移动技术网 > IT编程>开发语言>JavaScript > jquery文字上下滚动的实现方法

jquery文字上下滚动的实现方法

2018年10月19日  | 移动技术网IT编程  | 我要评论

代码如下:

//上下滚动

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)

});

});


如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网