我在使用jCarousel 1.11.2实例化我的新应用程序时遇到了问题。我不使用jQuery UI。
这是网站
我认为这个电话有问题:
jQuery('#mycarousel').jcarousel({
在以前使用jQuery 1.8.2的应用程序上,这个旋转木马运行时没有问题。
我测试了旋转木马使用的RSS源,看起来很好:博客RSS源
下面是之前运行的没有问题的确切代码:
var mycarousel_itemList = new Array();
function mycarousel_itemLoadCallback(carousel, state) {
for (var i = carousel.first; i <= carousel.last; i++) {
if (carousel.has(i)) {
continue;
}
if (i > mycarousel_itemList.length) {
break;
}
carousel.add(i, mycarousel_getItemHTML(mycarousel_itemList[i - 1]));
}
};
function mycarousel_getItemHTML(item) {
return '<a href="' + item.url + '">' + item.title + '</a>' + ' ' + item.description.replace(/<\/?[^>]+(>|$)/g, "");
};
jQuery(document).ready(function () {
$.get("http://www.davincispainting.com/blog/syndication.axd", function (data) {
var $xml = $(data);
$xml.find("item").each(function () {
var $this = $(this),
item = {
title: $this.find("title").text(),
link: $this.find("link").text(),
description: $this.find("description").text()
}
mycarousel_itemList.push({
url: item.link,
title: item.title,
description: item.description
});
});
jQuery('#mycarousel').jcarousel({
vertical: true,
scroll: 1,
auto: 1,
wrap: 'circular',
size: mycarousel_itemList.length,
itemLoadCallback: { onBeforeAnimation: mycarousel_itemLoadCallback }
});
});
});
<div class="col-md-4 boxopacity" style="margin-top: -10px;">
<div class="headline">
<h2>Painting Blog & Information</h2>
</div>
<ul id="mycarousel" class="jcarousel-skin-ie7">
</ul>
</div>
如果有人能告诉我我错过了什么会很有帮助吗?谢谢!
发布于 2015-06-03 19:10:39
请确保"jcarousel.min.js“文件的路径是否正确?
它显示了下面的错误。
"NetworkError: 404 Not Found - http://www.davincispainting.com/js/jquery.jcarousel.min.js"
如果是这样的话,那么请为同一条路径做出正确的选择。或者您也可以使用下面的路径。请检查一下,如果你还有同样的问题,请告诉我们。
jquery.jcarousel.js
并在jquery文件之后再包含一个文件。
发布于 2015-06-03 19:05:11
你查过日志了吗?存在许多问题(错误),包括无法加载jquery.jcarousel.min.js文件。
https://stackoverflow.com/questions/30634014
复制相似问题