Tagged: Accordion
Viewing 4 posts - 1 through 4 (of 4 total)
-
AuthorPosts
-
March 24, 2024 at 3:17 am #1438191
Hello,
I’m trying to recreate this section in the private content.
I have set it up with a accordion and easy slider and with the same classes and JS but somehow i can’t get it to work.I want it to change image if i click on accordion nr.2 i should change it to image nr. 2.
Can you help?
March 25, 2024 at 8:00 am #1438222Hey mvi,
Thank you for the inquiry.
Did you add this script?
jQuery(document).ready(function($) { // Replace the accordion selectors with your own accordion toggler selectors var accordions = $('#skillspring-process .toggler'); function forceSlideChange(slideshow, targetIndex) { var slides = slideshow.find('.avia-slideshow-inner li'); var activeSlide = slides.filter('.active-slide'); var targetSlide = slides.eq(targetIndex); // Stop any ongoing animations slides.stop(true, true); // Hide the current active slide activeSlide.removeClass('active-slide').css({ 'opacity': 0, 'visibility': 'hidden' }); // Show the target slide targetSlide.addClass('active-slide').css({ 'opacity': 1, 'visibility': 'visible' }); // Update the active control dot slideshow.find('.avia-slideshow-dots .goto-slide').removeClass('active').eq(targetIndex).addClass('active'); } accordions.on('click', function() { // Get the index of the clicked accordion toggler var index = accordions.index(this); // Replace the slideshow selector with your own slideshow selector var slideshow = $('#skillspring-process-slideshow'); // Check if the slideshow exists on the page if (slideshow.length) { forceSlideChange(slideshow, index); } }); });
You should also apply the ID “skillspring-process” to the Accordion element and the ID “skillspring-process-slideshow” to the Easy Slider element.
Best regards,
IsmaelMarch 25, 2024 at 1:30 pm #1438276I missed to add the ID to those.
Thank you so much!
March 25, 2024 at 5:51 pm #1438288 -
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.