// javascript document $(function(){ $("#nav li").hover( function(){ $(this).children("ul").slidedown("slow"); }, function(){ $(this).children("ul").slideup("slow"); } )} ) $(function(){ var s,sn=0,slen,time1,time2; var s = $("#topnews"); function scrollinit(){ slen = s.html().split("|"); var temphtml = ""; for(i=0;i"); } s.html(temphtml+slen[0]); time1 = setinterval(scrollstart,3000); s.mouseover(function(){ clearinterval(time2); clearinterval(time1); }) s.mouseout(function(){ time1 = setinterval(scrollstart,3000); }) } function scrollexec(){ if(sn>=31) { sn=0; clearinterval(time2) } else { sn++; s.scrolltop(s.scrolltop()+1); } } function scrollstart(){ if(s.scrolltop()>=slen.length*31) { s.scrolltop(0); } else { time2 = setinterval(scrollexec,30); } } scrollinit(); })