Concise scrolling code (scroll up and down)

Source: Internet
Author: User

HTML: The outermost div is set to a wide height.

<div class= "Apple" >

<ul>

<li><a href= "#" target= "_blank" > You are my little ya little Apple </a></li>

<li><a href= "#" target= "_blank" > How to Love You is not too much </a></li>

<li><a href= "#" target= "_blank" > Red little Face warm My heart </a></li>

<li><a href= "#" target= "_blank" > Lights up My life's Fire and Fire Fire </a></li>

<li><a href= "#" target= "_blank" > You are my little ya little Apple </a></li>

<li><a href= "#" target= "_blank" > like the most beautiful clouds on the horizon </a></li>

<li><a href= "#" target= "_blank" > Spring comes again with flowers full of hillsides </a></li>

<li><a href= "#" target= "_blank" > Kind of hope will harvest </a></li>

</ul>

</div>

jquery Code:

<script type= "Text/javascript" >
function AutoScroll (obj) {

$ (obj). Find ("ul"). Animate ({

MarginTop: " -39px"

},500,function () {

$ (this). CSS ({margintop: "0px"}). Find ("Li:first"). AppendTo (this);

})

}
$ (function () {
SetInterval (' AutoScroll (". Apple") ', 2000);
})
</script>

Concise scrolling code (scroll up and down)

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.