Use jQuery to intermittently scroll up a single line of text
Effect Web site: http://www.keleyi.com/keleyi/phtml/textscroll.htm
This effect enhanced version: http://www.keleyi.com/a/bjac/532bedbffca1affa.htm mainly increased the cursor hover Effect
The source code is as follows:
Copy codeThe Code is as follows:
<Script type = "text/javascript" src = "http://www.keleyi.com/keleyi/pmedia/jquery-1.9.1.min.js"> </script>
<Style type = "text/css">
. ScrollDiv {height: 25px;/* required element */line-height: 25px; border: # ccc 1px solid; overflow: hidden;/* required element */}
. ScrollDiv li {height: 25px; padding-left: 10px ;}
Ul, li {list-style-type: none; margin: 0px ;}</style>
<H2> jquery special effect single-line text Scrolling up (intermittent) <Div id = "scrollDiv_keleyi_com" class = "scrollDiv">
<Ul>
<Li> <a href = "http://www.keleyi.com/a/bjac/5d7f4ac2efa72d30.htm"> the menu is fixed after scrolling to the top </a> </li>
<Li> <a href = "http://www.keleyi.com/a/bjac/141932b419e08101.htm"> jquery uses ColorBox to pop up the picture group browsing layer </a> </li>
<Li> <a href = "http://www.keleyi.com/dev/fd9291320daf9360.htm"> sliding up the lower right corner of jquery to close the reproduction layer </a> </li>
<Li> <a href = "http://www.keleyi.com/a/bjac/bf0eb8c02085b10d.htm"> jquery clears input boxes such as textarea </a> </li>
</Ul>
</Div>
<Script type = "text/javascript">
Function AutoScroll (obj ){
$ (Obj). find ("ul: first"). animate ({
MarginTop: "-25px"
},500, function (){
Vertex (this).css ({marginTop: "0px"}). find ("li: first"). appendTo (this );
});
}
$ (Document). ready (function (){
SetInterval ('autoscroll ("# scrollDiv_keleyi_com") ', 3000 );
});
</Script>
Resolution:Use $ ('lil') to match a set of multiple li elements.
If you want to obtain the first li element, you can use ": first", that is, $ ('li: first ');