开发者

Create a Pagination Carousel with jQuery Cycle?

开发者 https://www.devze.com 2023-01-28 22:46 出处:网络
I\'m using malsup\'s amazing jQuery Cycle plug-in for a small gallery. I\'ve created thumbnail pagination with this code:

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'; 

   开发者_StackOverflow } 
 }); 

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!


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 :-)

0

精彩评论

暂无评论...
验证码 换一张
取 消