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

How to access individual carousel items #14

Open
antrecu opened this issue Jul 27, 2016 · 1 comment
Open

How to access individual carousel items #14

antrecu opened this issue Jul 27, 2016 · 1 comment
Labels

Comments

@antrecu
Copy link

antrecu commented Jul 27, 2016

Hi,

is there a way to interact with an specific element of the carousel? so for example, is there a way i can hide/show elements of a element that is in the back of a 4 items carousel.

help is very appreciated!

Thanks,

@specious
Copy link
Owner

The data('carousel') accessor gives you access to the carousel's internals at any time:

$('#showcase').data('carousel').items

If you'd like the opportunity to interact with the items directly on each frame, then the onRendered() hook makes that easy:

showcase.Cloud9Carousel({
  // ...
  onRendered: function(carousel) {
    for (i = 0; i < carousel.items.length; i++) {
      // You can manipulate items directly
      console.log(carousel.items[i])
    }
  }
})

@specious specious changed the title work with specific item on carousel How to access individual carousel items Nov 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants