Kristen Grote
Kristen Grote

Reputation: 2777

Create a Pagination Carousel with jQuery Cycle?

I'm using malsup's amazing jQuery Cycle plug-in for a small gallery. I've created thumbnail pagination with this code:

$('#gallery').cycle({ 
    fx:     'fade', 
    speed:  'fast', 
    timeout: 0, 
    pager:  '#pagination',
    pagerAnchorBuilder: function(idx, slide) { 
    return '#pagination li:eq(' + idx + ') a'; 

    } 
 }); 

What I'd love to do is make the pagination a horizontal carousel using Cycle's built-in "scrollHoriz" effect, but I don't know how! I could use the jQuery Carousel plug-in, but it just seems silly to add a whole new plugin when I'm sure Cycle has the capability. Has anyone done this? Any suggestions on how I might go about it? Thanks!

Upvotes: 2

Views: 1875

Answers (1)

prodigitalson
prodigitalson

Reputation: 60413

Actually youre better off using an actual carousel plugin like jCarousel. You could do it using cycle as the base, but there is a lot of additional functionality you would need to create - essentially writing your own plugin. Youre better off just using a carousel plugin form the start.

There is even a question somewhere on SO where the author of Cycle says as much :-)

Upvotes: 1

Related Questions