External controls and callbacks

Permalink Browser Info Environment
I have added external controls for buttons to control each slide and have made use of callback "afterEnd" to bind the external controls as the slides move. When I don't click on the buttons, the slider change is smoothly reflected on the buttons. But when I click on one of the buttons, the "next" button is selected. I know it's due to the else statement in the afterEnd below but not sure how to fix this. Any thoughts?

Below is what I have in the Carousel Pro's view.php:

$("#jbCarousel<?php  echo $bID; ?>").jCarouselLite({
    ///Few lines omitted...
    btnNext: ".externalControl .next",
    btnPrev: ".externalControl .prev",
    btnGo:
    [".externalControl .1", ".externalControl .2",
    ".externalControl .3", ".externalControl .4"],
    afterEnd: function() {
         if($(".externalControl").last().hasClass("selected")) {
            $(".externalControl").first().addClass("selected");
            $(".externalControl").last().removeClass("selected");
         } else {
            $(".selected").removeClass("selected").next().addClass("selected");
         }
    }


Below is what I have in my template file:
$(".externalControl.1").addClass("selected");
$(".externalControl").click(function() {
    $(".externalControl").addClass("selected").not(this).removeClass("selected");
});

Type: Discussion
Status: New
BlueFractals
View Replies:
jb1 replied on at Permalink Reply
jb1
I'll have a closer look at that code and get back to you.
Thanks for your patience.

JB
BlueFractals replied on at Permalink Reply
BlueFractals
Any luck with that? :)
jb1 replied on at Permalink Reply
jb1
Hi greent,

Good day!

Can you provide the url for your site? PM it if need be.

Thanks much,
JZ

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.