我已经在我的页面上设置了循环插件,并通过 ajax 将动态内容调用到页面中。然后我将此内容放入 div 中,然后运行插件。问题是它有时会在加载页面时完美运行,然后当我刷新页面时它根本不会加载。
有什么建议么?
$.ajax({
url: "http://www.site.co.uk/cgi-bin/latest-instructions-2.pl",
success: function(html){
$("#slider").html(html);
}
});
$('#slider').cycle({
fx: 'scrollLeft',
cleartype: true,
cleartypeNoBg: true,
pager: '#li-number2',
requeueOnImageNotLoaded: true
});