gijsroge / OwlCarousel2-Thumbs

Enables thumbnail support for Owl Carousel 2.0
MIT License
220 stars 136 forks source link

Using thumbs as another owl carousel causes issues. #6

Closed ImranBug closed 8 years ago

ImranBug commented 8 years ago

When using next and previous arrow of thumbs carousel it triggers the first slide in parent carousel as well. How can I stop that?

Also note that to make the thumbs behave as a separate owl carousel I had to keep the "owl-thumbs" class and "data-slider-id" on a parent div of thumbs carousel.

ImranBug commented 8 years ago

Fixed !!

I changed this line:

$(this._thumbcontent._thumbcontainer).on('click', this._thumbcontent._thumbcontainer.children(), $.proxy(function (e) {

To this line:

$('.owl-thumb-item', this._thumbcontent._thumbcontainer).on('click', this._thumbcontent._thumbcontainer.children(), $.proxy(function (e) {

The problem was it was taking the click on arrows as a click on thumb image.

bogdaniel commented 8 years ago

can you provide an example for you way i'm having the same problem and didn't figure out your comment. it didn't work not even if i changed the line. I added the class and data-slider-id on owl-stage

ImranBug commented 8 years ago

Can you create a fiddle? It would be easier to analyze what is different that you did.