我有一个节点应用程序,我正在使用ejs作为我的视图驱动程序,我正在尝试使用this优秀的插件。
代码本身运行得很好,但是当我使用ejs加载动态代码时,它就停止了。(如果我尝试使用静态html,它可以很好地工作)。
我的ejs:
<% if(jobs !== undefined){ %>
<div class="container">
<div class="well well-sm newswell">
<ul class="newsticker"><strong>
<% jobs.forEach(function(item){ %>
<li><%= item.message %></li>
<% }); %>
</strong></ul>
</div>
</div>
<% } %>和脚本:
jQuery(document).ready(function() {
setTimeout(function() {
$('.newsticker').newsTicker({
max_rows: 1,
speed: 600,
direction: 'down',
duration: 4000,
pauseOnHover: 1
});
}, 2000);
});为什么它们会发生碰撞?
https://stackoverflow.com/questions/44434697
复制相似问题