//Style file:
<style type= "Text/css" > *{margin:0;padding:0; }. Scrollnews{width:100%;Height:20px;Overflow:Hidden;background:#FFFFFF;Border:0px solid #AAAAAA; }. Scrollnews ul{padding:2px 5px 5px 25px; }. scrollnews ul Li{Height:20px;List-style-type:None;font-size:Small; }a{text-decoration:None; }</style>
Head JS
Don't forget to import the jquery library
$(function () { varsettime; $(". Scrollnews"). Hover (function() {clearinterval (settime); }, function() {settime= SetInterval (function () { var$first = $ (". Scrollnews Ul:first");//Select the first ul under Div instead of Li; varHeight = $first. Find ("Li:first"). Height ();//get the height of the first Li, prepare for the UL move up;$first. Animate ({"margintop":-height + "px"}, 600,function() {$first. css ({margintop:0}). Find ("Li:first"). AppendTo ($first);//set the top margin to zero to prepare for the next move }); }, 3000); }). Trigger ("MouseLeave");//the trigger () method is used to trigger the Set event type of the selected element});
JSP Body Area
<Divclass= "Scrollnews">
<imgwidth= " the"Height= " the"src= "Img/laba.png"Align= "Left"> <ul> <Li><aclass= "tooltip"title= "Query Module menu name Update announcement: Starting from 2015-02-09, the Query module menu uses the new name, please refer to the" Query module new and old name comparison table below. ">Query Module Menu name Update announcement: Starting from 2015-02-09, the Query module menu uses the new name, please refer to the "Query module new and old name comparison table" below.</a> </Li> <Li><aclass= "tooltip"title= "Query Module menu name Update announcement: Starting from 2015-02-09, the Query module menu uses the new name, please refer to the" Query module new and old name comparison table below. ">Query Module Menu name Update announcement: Starting from 2015-02-09, the Query module menu uses the new name, please refer to the "Query module new and old name comparison table" below.</a> </Li> </ul> </Div>
jquery Online Rollover Effect announcement