Solved

Using 2 Carousels at once

Posted on 2012-03-23
2
193 Views
Last Modified: 2012-04-30
Hello,

I have a page with 2 jquery carousels running at the same time - http://testing.arrivaldesign.co.uk

This is working fine, the arrows going left and right are working and the dots are working, but I need it so that the dots state changes as the carousel is going through, either automatically or when the arrows are clicked.

Can anyone offer any assistance?

Thanks,

Chris
0
Comment
Question by:djfenom
[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 Comments
 
LVL 7

Accepted Solution

by:
Lalit Chandra earned 500 total points
ID: 37758047
Oops Very hard but interesting to find the solution.. Just add the following line to your head script section



$(".jcarousel-control").find("a").removeClass("onstate").click(function() { $(this).addClass("onstate"); });

jQuery('.first-and-second-carousel').jcarousel({
itemLoadCallback: {
  onBeforeAnimation: function() {
     //$(".jcarousel-control").find("a").removeClass("onstate")
var j =$(".jcarousel-control").find(".onstate").removeClass("onstate").next("a").addClass("onstate");
if(j.length == 0) $(".jcarousel-control").find("a:first").addClass("onstate");
     
console.log("ok");
   
   }

}}
);

Hope this will work
0
 

Author Comment

by:djfenom
ID: 37764735
That works great thanks, only slight issue is that the left arrow makes the dots go forward and not backwards?
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
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…

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