Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript JQuery index(); of parent-DIV Reply To: JQuery index(); of parent-DIV

#145575
Leonhard Ortner
Participant

Hello Guys,

got this working:

// SLIDE TO RIGHT SLIDE
    // setTimeout for Slider to get rdy
    setTimeout(function() {

        // pathname = url
        var pathname = window.location.href;

        // current active slide
        var currentslide = $(".rsActiveSlide").find(".rsContent").data("slide-infourl");

        if (pathname != currentslide) {

        // Select the right Slide width the corresponding URL in DATA-INFOURL
        var rightone = $(".rsContainer").find(".rsContent" + "[data-slide-infourl='" + pathname +"']").parent().index();

        // slider goTo
        slider.goTo(rightone);

        }

    }, 500);

wbr leo