Function scroll (){ $ (". Content ul"). animate ({"margin-left": "-110px"}, function (){ // This is to let the entire ul first slide forward a li, if you want to slide 5 ~ It is 550px. // If You Want To scroll up, change it to $ (". content ul"). animate ({"margin-top": "-105px "} // If You Want To scroll down, change it to $ (". content ul"). animate ({"margin-top": "105px "} // If You Want to scroll to the right, change it to $ (". content ul"). animate ({"margin-left": "110px "} $ (". Content ul li: eq (0)"). appendTo ($ (". content ul ")) $ (". Content ul" ).css ({"margin-left": 0 }) // Corresponding to this // If You Want To scroll up, change it to $ (". content ul"). animate ({"margin-top": 0} // If You Want To scroll down, change it to $ (". content ul"). animate ({"margin-top": 0} // If You Want to scroll to the right, change it to $ (". content ul"). animate ({"margin-left": 0} }) } SetInterval (scscroll, 1000) // The above 1000 is the rolling speed, which can be adjusted by yourself |