Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Using 2 Carousels at once

Posted on 2012-03-23
2
Medium Priority
?
196 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 2000 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

719 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