• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1381
  • Last Modified:

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
0
coolispaul
Asked:
coolispaul
  • 2
1 Solution
 
leakim971PluritechnicianCommented:

var total_number = $(".jcarousel-item").length;

Open in new window

0
 
coolispaulAuthor Commented:
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);}
 
    }
0
 
leakim971PluritechnicianCommented:
No, I don't know, sorry.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now