Wilto / Dynamic-Carousel

A carousel plugin built for responsive layouts. There are many like it, but this one is mine.
matmarquis.com/carousel/
472 stars 112 forks source link

Multiple carousels, single nav buttons #34

Closed paulmist closed 13 years ago

paulmist commented 13 years ago

Hi

I've got multiple carousels that I'd like to control using the same links (.next, .prev).

Anyway I can achieve this easily?

Thanks

paulmist commented 13 years ago

Have worked this out for prev/next buttons - just use a trigger('click') and leave the secondary carousel links empty. An odd way to do it, but it works. Can't do the same with pagination though. Any thoughts on a better way to do this?

Thanks

Wilto commented 13 years ago

You should be able to target multiple sliders based on the href of the next/prev links. You’d just point them at the id of the slider in question. I just gave it a shot in my local repo, and it seems to have done the trick.

paulmist commented 13 years ago

So you'd basically drop in multiple hrefs with differing IDs as the value?

I ended up using the gist you advised and the carousel script with a trigger() activating the former from the links of the latter

On 10 Sep 2011, at 19:41, Mat Marquisreply@reply.github.com wrote:

You should be able to target multiple sliders based on the href of the next/prev links. You’d just point them at the id of the slider in question. I just gave it a shot in my local repo, and it seems to have done the trick.

Reply to this email directly or view it on GitHub: https://github.com/Wilto/Dynamic-Carousel/issues/34#issuecomment-2060590

Wilto commented 13 years ago

Ah, yeah, that gist for setting up a fading slider? trigger() is the way to go using that one, for sure.

paulmist commented 13 years ago

Yeah works a treat, especially since my second "carousel" really works as overlaid, crossfaded content.

On 10 Sep 2011, at 21:08, Mat Marquisreply@reply.github.com wrote:

Ah, yeah, that gist for setting up a fading slider? trigger() is the way to go using that one, for sure.

Reply to this email directly or view it on GitHub: https://github.com/Wilto/Dynamic-Carousel/issues/34#issuecomment-2060978