function timer(opj){ $(opj).find('ul').animate({ marginTop : "-3.5rem" },500,function(){ $(this).css({marginTop : "0.7rem"}).find("li:first").appendTo(this); }) } $(function(){ var num = $('.notice_active').find('li').length; if(num > 1){ var time=setInterval('timer(".notice_active")',3500); $('.gg_more a').mousemove(function(){ clearInterval(time); }).mouseout(function(){ time = setInterval('timer(".notice_active")',3500); }); } $(".news_ck").click(function(){ location.href = $(".notice_active .notice_active_ch").children(":input").val(); }) }); "/>

jQuery网站公告上下滚动自动轮播代码

131
0
文字上下滚动代码网站公告自动轮播网站公告向上滚动代码
jQuery网站公告上下滚动自动轮播代码是一款超级实用的网站公告上下轮播翻动特效。
<script type="text/javascript">
	function timer(opj){
		$(opj).find('ul').animate({
			marginTop : "-3.5rem"  
			},500,function(){  
			$(this).css({marginTop : "0.7rem"}).find("li:first").appendTo(this);  
		})  
	}
	$(function(){ 
		var num = $('.notice_active').find('li').length;
		if(num > 1){
		   var time=setInterval('timer(".notice_active")',3500);
			$('.gg_more a').mousemove(function(){
				clearInterval(time);
			}).mouseout(function(){
				time = setInterval('timer(".notice_active")',3500);
			}); 
		}
		
		$(".news_ck").click(function(){
			location.href = $(".notice_active .notice_active_ch").children(":input").val();
		})
	});
</script>