我正在使用此插件:Li-Scroller 以下是代码:Jquery Function Code
当我通过函数应用于无序列表时,我有任何方法可以销毁/停止/重新启动它(删除所有div并标记然后重新启动它)。
<ul id="ticker01">
<li><span>10/10/2007</span><a href="#">The first thing ...</a></li>
<li><span>10/10/2007</span><a href="#">End up doing is ...</a></li>
<li><span>10/10/2007</span><a href="#">The code that you ...</a></li>
<!-- eccetera -->
</ul>
$("ul#ticker01").liScroll();
答案 0 :(得分:1)
要停止并销毁滚动条,您只需要“撤消”li-scroller添加的所有内容,以便您可以使用以下jQuery:
$("ul#ticker01")
.clearQueue().stop() //stops animation
.unwrap() //removes mask div
.unwrap() //removes tickercontainer div
.unbind() //unbinds any events attached (like hover)
.removeClass('newsticker') //removes the extra class
.removeAttr('style'); //removes the height style
答案 1 :(得分:0)
当您将鼠标悬停在文本
上时,它将停止动画$("ul#ticker01").liScroll({travelocity: 0.15});