Solved

jCarousel Pagination

Posted on 2011-09-06
3
1,343 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

756 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