admin管理员组文章数量:1327843
I have been banging my head for hours on this. I have jCarousel set up almost identically to their "simple" example, and I'm not getting any scrolling. If you set the width of the container higher, you can see that all the images are stacked on top of each other vertically rather than horizontally, but the UL is taking the proper "horizontal" class.
Help!
/
I have been banging my head for hours on this. I have jCarousel set up almost identically to their "simple" example, and I'm not getting any scrolling. If you set the width of the container higher, you can see that all the images are stacked on top of each other vertically rather than horizontally, but the UL is taking the proper "horizontal" class.
Help!
http://vermontgrapeandwinecouncil./eden-ice-cider-pany/
Share Improve this question asked Jun 29, 2009 at 4:49 AaronAaron 1- is this the carousel you are trying to fix? – Rony Commented Jun 29, 2009 at 5:04
6 Answers
Reset to default 3I have solved this issue. I had the UL set to display:none; and then a script setting it to show after the carousel loaded to prevent an awkward flash of unstyled content. Apparently, that was giving jCarousel some trouble calculating the widths of the items since the list was not displayed. Thanks, everyone.
I was having an issue getting the unstyled flash hidden during the page load with this plugin. The most simple fix for me was to apply a css value of visibility:hidden to the <ul>
element then remove that css value after jCarousel loaded. Applying visibility:hidden rather than display:none allowed the correct widths of the <li>
elements to be calculated by the jCarousel plugin.
Thanks guys... this worked for me
jQuery(document).ready(function() {
$('#<%=myImagecarousel.ClientID%>').jcarousel();
$('#<%=myImagecarousel.ClientID%>').removeAttr('style');
$('#<%=myImagecarousel.ClientID%>').show();
});
The ul containing everything is set far too narrow. Expand it, or try removing the width altogether.
You have a ul with id "carousel" that has an inline style with width: 110px.
Try taking that width declaration out or making it larger.
Are you sure your jcarousel declaration is getting called?
I see you are declaring using this:
(function($) {
$(function() {
$('#carousel').jcarousel();
$('#carousel').show();
});
})(jQuery)
Try taking the inside function out to make it look like:
(function($) {
$('#carousel').jcarousel();
$('#carousel').show();
})(jQuery)
The reason I say this is because if I call $('#carousel').jcarousel() in firebug, it works correctly.
本文标签: javascriptjCarousel not workingStack Overflow
版权声明:本文标题:javascript - jCarousel not working - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742219195a2435129.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论