Skip to content
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

Nested carousels - scrolling one, scroll the nested ones #61

Closed
leup opened this issue Oct 7, 2010 · 3 comments
Closed

Nested carousels - scrolling one, scroll the nested ones #61

leup opened this issue Oct 7, 2010 · 3 comments

Comments

@leup
Copy link

leup commented Oct 7, 2010

Hi,

i use your script for nested carousels.

When you scroll the top level carousel, the scrolling happens also on sub-carousels.

This is because in the case of nested carousels the function get don't work properly.

the wordaround i use is to assign a unique id to every carousel and add this id to the class added to items.

here is my mod : (first time i use gist, hem..)

http://gist.github.com/615280

@jsor
Copy link
Owner

jsor commented Oct 7, 2010

Good point, i think a simpler solution would be:

get: function(i) {
    return $('>.jcarousel-item-' + i, this.list);
}

Note the > in the selector, this should only select <li>'s which are direct children of the list.

I'm going to test this and add a patch...

@leup
Copy link
Author

leup commented Oct 7, 2010

Woot, i like simpler solution. I'll try it myself.

edit: just tried and it seems to work like a charm.

@jsor
Copy link
Owner

jsor commented Oct 8, 2010

Fix selecting only direct childs of the current list (Closed by caa87a3)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants