jquery implements text from bottom to top loop scrolling

Source: Internet
Author: User

Have the following code:

The code is as follows

<div id= "Odiv" >
<ul id= "Oul" >
<li> 1th li Element </li>
<li> 2nd li Element </li>
<li> 3rd li Element </li>
<li> 4th li Element </li>
<li> 5th li Element </li>
<li> 6th li Element </li>
<li> 7th Li Element </li>
<li> 8th li Element </li>

But the page only shows the first 5 Li (related CSS do not repeat), want to loop show Li inside the content is in the enactment of the time will be the UL move up Li's height, at the same time will be the first Li added to the UL in the end of Li.

The code is as follows:

code as follows  

function AutoScroll (obj, ul_bz) {
$ (obj). Find (UL_BZ). Anima Te ({
margintop: " -25px"
},500,function () {
$ (this). CSS ({margintop: "0px"}). Find ("Li:first"). Appendto ( this);
SetInterval (' AutoScroll (' #oDiv ', ' #oUl ') ', 3000)

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.