jQuery implements a simple interval scrolling up effect

  • 2020-05-12 02:10:38
  • OfStack

This article demonstrates an example of how jQuery implements a simple interval scrolling up effect. Share with you for your reference. The specific implementation method is as follows:

<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
<div id="broadcast" class="bar" name="giftactive">
 <div style="float:left"><strong> Interval scrolling effect: </strong></div>
 <div id="demo" style="overflow:hidden;height:22px;line-height:22px;">
     <ul class="mingdan" id="holder">
  <li><a href="#" target="_blank">aaaaaa</a></li>
  <li><a href="#" target="_blank">bbbbbb</a></li>
  <li><a href="#" target="_blank">cccccc</a></li>
  <li><a href="#" target="_blank">dddddd</a></li>
  <li><a href="#" target="_blank">eeeeee</a></li>
<script type="text/javascript">
function AutoScroll(obj) {
 marginTop: "-22px"
 }, 500, function() {
 $(this).css({ marginTop: "0px" }).find("li:first").appendTo(this);
 $(document).ready(function() {
 setInterval('AutoScroll("#demo")', 1000)

I hope this article has been helpful to your jQuery programming.

Related articles: