Link to home
Start Free TrialLog in
Avatar of coolispaul
coolispaulFlag for United States of America

asked on

jCarousel Pagination

Hi,

does anyone know how to get the total number of items in jCarousel

I am trying to create a 1 of 7 , 2 of 7 pagination so the users know what slide they are on.



Thanks
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of coolispaul

ASKER

great that works but do you know how to make a pagination function for jcarousel potentially using this.

I tried the following without much luck:

jQuery('#mycarousel2').jcarousel({
      wrap: 'circular',
      scroll:1,
      itemLoadCallback: trigger
    });

   
    function trigger(carousel, state) {
       
      var total_number = $("#mycarousel2 .jcarousel-item").length;

      if(carousel.first > total_number) { $("#counter").html(1); } else { $("#counter").html(carousel.first);}
 
    }
No, I don't know, sorry.