How to implement jquery news scrolling (common method Note 1)

Source: Internet
Author: User

1<script type="Text/javascript">2 3 $ (document). Ready (function () {4SetInterval ('AutoScroll ("#Div_contain_ul")', +)//1000 Refresh time for the whole process;5     });6 7 8 function AutoScroll (obj) {9$ (obj). Find ("Ul:first"). Animate ({margintop:"-25px"}, -, function ()//-25px the distance for the message to scroll up, 800 for the time the message scrolls up;Ten         { One$( This). CSS ({margintop:"0px"}). Find ("Li:first"). AppendTo ( This);//0px margin-top value after the message is scrolled up A         }); -     } -</script>

Do your own website just use, all the news is placed in a DIV layer in the UL, each message is placed in the UL Li. Li can add some <a>,<image>,<div> according to their needs. Can be used as a front-end test.

How to implement jquery news scrolling (common method Note 1)

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.