-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trigger go event doesn't work with nested carousels #47
Comments
@roscopeeco Thanks for the report. Can you point me to a URL where I can see the problem? If not, can you provide some HTML and the code you're using so I have something to work with as I debug this? Thanks! |
Hi Karl I've set up a fiddle here: If you click 'next' on the parent then click on 'next'on the child - it actually goes to next on both the parent and child. if you then click 'back' on the parent and then click 'go 0' on the child it goes to the first parent again hope this helps thanks Ross |
Thanks, @roscopeeco . I'll investigate as soon as I'm able. |
Okay, I just took a quick look, and I saw that the problem was due to the parent's Here's a fiddle showing the fix: By the way, you could also use a function (sorry I haven't documented that yet), returning the element you want to use. For example: var parentoptions = {
// ...
btnNext: function() {
return $(this).children('.next');
},
btnPrev: function() {
return $(this).children('.prev');
}
};``` |
Hi Karl Thanks for the quick reply. Ah yes schoolboy error regarding the prev,next options BUT still got the issue with the child.trigger('go',0). i've amended the original demo: Thanks ross |
Hello
I have encountered a bug when trying to use the 'go' event with nested carousels.
When the trigger go event is executed for the child carousel - $('div.subcarousel').trigger('go', '0') - the go actually is applied to the parent carousel instead.
thanks
Ross
The text was updated successfully, but these errors were encountered: