Slider count

587 views
Skip to first unread message

Chris

unread,
Jun 2, 2012, 7:25:23 AM6/2/12
to slid...@googlegroups.com
Hello,

I would like to show the slide count as 2 of 10 on my slider. How do I make it work with the transitions 3 of 10, 4 of 10 (as the slider moves with slides) & 7 of 10 (if the corresponding thumbnail was clicked)?

Chris

unread,
Jun 2, 2012, 8:02:06 AM6/2/12
to slid...@googlegroups.com
Ok, I found a way via animationComplete callback. This is my code:

JS:

jQuery(function(){
var total = jQuery('.slides_container img').length; 
$("#slides").slides({
animationComplete: function(current){
jQuery(".current-slide").html(current);
        }
});
jQuery('.total-slides').html(total);
});

HTML: 

<span class="current-slide"></span>/<span class="total-slides"></span>

Daniel Codrea

unread,
Jan 11, 2013, 3:45:42 AM1/11/13
to slid...@googlegroups.com
Hi.
Your code works like charm.
Thanks!
Reply all
Reply to author
Forward
0 new messages