How to Hyperlink Testimonial Carousel Widget items

Paste these code into an html widget below the slider

				
					<script>
  document.addEventListener("DOMContentLoaded", function () {
    // Define your links here (in order of your 7 slides)
    const slideLinks = [
      "https://example.com/testimonial-1",
      "https://example.com/testimonial-2",
      "https://example.com/testimonial-3",
      "https://example.com/testimonial-4",
      "https://example.com/testimonial-5",
      "https://example.com/testimonial-6",
      "https://example.com/testimonial-7"
    ];

    const slides = document.querySelectorAll('.elementor-12 .elementor-element.elementor-element-89bf831 .swiper-slide');

    slides.forEach((slide, index) => {
      const url = slideLinks[index];
      if (url) {
        slide.style.cursor = 'pointer';
        slide.addEventListener('click', () => {
          window.open(url, '_blank');
        });
      }
    });
  });
</script>

				
			
Tags :
Share :

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post :

Digital Marketer Web Developer Kerala

Aevine Pierre

Hi, I am a freelance Digital Marketer and e-commerce developer in Trivandrum, I help businesses to grow through Digital Marketing

Leave a Reply

Your email address will not be published. Required fields are marked *