admin管理员组文章数量:1419242
I have 4 tabs, each containing a carousel. The problem is that only the carousel in the first tab works fine. If you activate the second tabs, the carousel divs are all collapsed.
Here is an example with bootstrap 3 tabs and 'slick' plugin for the carousel: /
I tried multiple tabbing scripts and it's the same problem no matter what I use. The carousel works fine in the second tab if you try to move it a bit..then it somehow activates.
Is this a plugin initialization problem? Here's how I do it:
$('.carousel').slick({
slidesToShow: 3,
slidesToScroll: 1,
dots: false,
arrows: true
});
Please give me some solution or idea to get this carousel working properly. I tried tweaking the css but I got no result.
I have 4 tabs, each containing a carousel. The problem is that only the carousel in the first tab works fine. If you activate the second tabs, the carousel divs are all collapsed.
Here is an example with bootstrap 3 tabs and 'slick' plugin for the carousel: http://www.example.design-way.ro/
I tried multiple tabbing scripts and it's the same problem no matter what I use. The carousel works fine in the second tab if you try to move it a bit..then it somehow activates.
Is this a plugin initialization problem? Here's how I do it:
$('.carousel').slick({
slidesToShow: 3,
slidesToScroll: 1,
dots: false,
arrows: true
});
Please give me some solution or idea to get this carousel working properly. I tried tweaking the css but I got no result.
Share Improve this question asked Jun 28, 2014 at 15:46 NicolaeBozbiciNicolaeBozbici 2933 silver badges10 bronze badges 1- This is one reason I like to write my own tools. Sure it takes longer, but my tools will all be patible with each other. Unlike those plugins you're using.. – Niet the Dark Absol Commented Jun 28, 2014 at 16:19
3 Answers
Reset to default 3I have meet this issue When have 3 tabs, each containing a carousel. PROBLEM: The problem is that only the carousel in the first tab works fine. If you activate the second tabs, the carousel divs are all collapsed.
SOLUTION: After mail to auther of script for help. We have the resolve:
- Moved all CSS files first, followed by all js files
- Started javascript of Carousel first and Tabs next
For my sample has used script from: + TABs script: Simple-Tabbed-Content-Slider-Plugin-For-jQuery-tabbedcontent demo: http://www.racotecnic./tutorials/tabbedcontent/demo.html download: http://www.jqueryscript/demo/Simple-Tabbed-Content-Slider-Plugin-For-jQuery-tabbedcontent/#tab-1 + Carousel script: als.musings.it
I'm not familiar with the tabs plugin you used, but you should enable carousel only on active (and visible) tabs only (you should have a callback for tab switching)
I also faced the same problem. The best ever solution I have found in this: http://jsfiddle/phpdeveloperrahul/bejFM/
Not only that. bxSlider offers a lot of options those are easy to understand and use. Some of the options I am mentioning in the following section:
mode: 'horizontal',
auto: true,
autoControls: true,
pause: 2000,
maxSlides: 4,
minSlides: 1,
controls: true,
infiniteLoop: true,
moveSlideQty: 1,
slideWidth: 200,
responsive: true,
Hope this will fulfill your need.
本文标签: javascriptCarousel inside tabsStack Overflow
版权声明:本文标题:javascript - Carousel inside tabs - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745300671a2652353.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论