jQuery文字上下滚动

 

jQuery文字淡入淡出:

function scrollNews() {
  $('#ulInformation li').eq(0).fadeOut('slow', function() {
  $(this).clone().appendTo($(this).parent()).fadeIn('slow');
  $(this).remove();
  });
}

setInterval('scrollNews()', 3000);

jQuery文字上下滚动:

function scrollNews() {

$('#ulInformation li:first').animate({ marginTop: "-30px" }, 'slow', function() {
$(this).css({ marginTop: "0px" }).clone().appendTo($(this).parent());
$(this).remove();

});

}

setInterval('scrollNews()', 3000);

posted @ 2014-07-22 10:52  Xinney  阅读(228)  评论(0编辑  收藏  举报