Hi everyone !
I’m trying to write a custom script to make the Slider (nestable) element… slide when clicking on a “Next” and “Prev” text links placed in my header.
I added custom attributes to both link so i tried and a script (Settings > Custom Code > Body scripts) to trigger the click on the slider arrows while clicking on them but nothing happens.
I’m no dev so i tried to scavenge ressources on the net and mix it to achieve something but i failed haha
Here’s the script i tried :
<script>
$(document).on('click', '#slide-prev', function(e) {
$(".splide__arrow--prev").trigger('click');
});
</script>
Where “#slide-prev” is the custom ID added to the text link and “.splide__arrow–prev” is the class i target to click on the slider arrow
Have a nice day !