Solved

jCarousel Pagination

Posted on 2011-09-06
3
1,326 Views
Last Modified: 2012-06-27
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
Comment
Question by:coolispaul
  • 2
3 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 36490948

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

Open in new window

0
 

Author Comment

by:coolispaul
ID: 36491174
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
 
LVL 82

Expert Comment

by:leakim971
ID: 36491186
No, I don't know, sorry.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now