Tagged: easy slider
-
AuthorPosts
-
November 28, 2025 at 9:11 pm #1491930
Hi,
In this recipe page, I want hovering the ingredients list automatically shows the corresponding ingredient image in the Easy Slider.
I noticed those links for slider dots, but they have no effect when used outside Easy Slider:
<a href='#1' class='goto-slide active'>1</a> <a href='#2' class='goto-slide '>2</a> <a href='#3' class='goto-slide '>3</a> <a href='#4' class='goto-slide '>4</a> <a href='#5' class='goto-slide '>5</a> <a href='#6' class='goto-slide '>6</a> <a href='#7' class='goto-slide '>7</a> <a href='#8' class='goto-slide '>8</a>Thanks,
SergeNovember 29, 2025 at 3:55 pm #1491948Hey photographie-tous-azimuts,
Thanks for your patience, try this code in your child theme function.php:function custom_ingredientItems_script() { ?> <script> // Wait for DOM to be fully loaded document.addEventListener('DOMContentLoaded', function() { // Get all ingredient list items const ingredientItems = document.querySelectorAll('.flex_column li'); // Get all slider navigation dots const slideDots = document.querySelectorAll('.avia-slideshow-dots .goto-slide'); // Exit early if either element group doesn't exist if (ingredientItems.length === 0 || slideDots.length === 0) { return; } // Make sure we have matching items const itemCount = Math.min(ingredientItems.length, slideDots.length); // Add click handlers to each ingredient item for (let i = 0; i < itemCount; i++) { const li = ingredientItems[i]; const dot = slideDots[i]; // Add cursor pointer style li.style.cursor = 'pointer'; // Add click event li.addEventListener('click', function() { // Trigger click on corresponding slider dot dot.click(); // Optional: Add visual feedback ingredientItems.forEach(item => item.style.fontWeight = 'normal'); li.style.fontWeight = 'bold'; }); } // Optional: Highlight first ingredient by default if (ingredientItems.length > 0) { ingredientItems[0].style.fontWeight = 'bold'; } }); </script> <?php } add_action( 'wp_footer', 'custom_ingredientItems_script', 99 );In my test it is working.
Best regards,
MikeDecember 1, 2025 at 8:34 pm #1491995Hi Mike,
Thank you so much for taking the time to write and test this code !!! This is the best support ever !
It did work on first attempt. I just added a 5-star review on Theme Forest.Serge
December 1, 2025 at 10:46 pm #1491998Hi,
Thank you for your review on Theme Forest, glad that this helped. If you have further questions please open a new thread and we will try to help. Thanks for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘External control for Easy Slider’ is closed to new replies.
