使用 .load() jquery 刷新 div
我有这个 jquery 插件函数 (Vticker)
$('#box_car_news .car_news').vTicker({
animation: 'fade',
speed: 1500,
pause: 2000,
mousePause: true,
direction: 'up',
showItems: 5,
height:210
});
on my main page i have this <div id="box_car_news"></div>
in a different page i have
<div class="car_news">
<ul>
<li>DB data dynanic</li>
<li>DB data dynanic</li>
<li>DB data dynanic</li>
</ul>
</div>
$('#box_car_news').load('module_news.asp');
通过“load”函数,我将加载ID为box_car_news的div内列表的动态内容,
但vticker不起作用,因为实际上列表代码“car_news”在我的源代码中不存在,
我想每隔几秒刷新一次动态内容
i have this jquery plugin function (Vticker)
$('#box_car_news .car_news').vTicker({
animation: 'fade',
speed: 1500,
pause: 2000,
mousePause: true,
direction: 'up',
showItems: 5,
height:210
});
on my main page i have this <div id="box_car_news"></div>
in a different page i have
<div class="car_news">
<ul>
<li>DB data dynanic</li>
<li>DB data dynanic</li>
<li>DB data dynanic</li>
</ul>
</div>
$('#box_car_news').load('module_news.asp');
by "load" function i will load dynamic content of list inside div with id box_car_news
but vticker doesnt works because actually the list code "car_news" doesnt exist on my source code
i would like refresh dinamic contents every a few seconds
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
showItems
应该是一个整数。 5 有效,5.5 无效。showItems
should be a whole number. 5 is valid, 5.5 is not.