title: Swiper Slider is not working in tabs wordpress elementor
body: <p>I am trying to load the carousel (<code>swiper slider</code>) inside some tabs in Elementor WordPress. The carousel works fine before clicking on tabs, but whenever I click on tabs, the carousel shows but does not &quot;slide&quot;.<br />
  I have seen few questions regarding this topic and tried their solutions, but no luck.<br />
  Right now, I am trying this code in (<code>child-theme/function.php</code>) which is giving me an error:</p>
  <blockquote>
  <p>Error -&gt; &quot;Uncaught TypeError: Cannot read property 'params' of undefined&quot;</p>
  </blockquote>
  <pre><code>add_action('wp_footer', 'swiperCarousel', 9999999999);
  function swiperCarousel() {
      ?&gt;
      &lt;script&gt;
  var refreshSliders = function(){
  
          jQuery( &quot;.swiper-container&quot; ).each(function( index ) {
              swiperInstance = jQuery(this).data('swiper');
              swiperInstance.params.observer = true;
              swiperInstance.params.observeParents = true;
              swiperInstance.update();
          });
  
  }
  
  window.onload = function()
  {
      console.log('Document loaded');
     
     jQuery(&quot;#aws-carousel-switcher&quot;).on(&quot;click&quot;, function(){ 
         console.log('Tab has been clicked');
              var $this = jQuery(this);
      
      refreshSliders();
      
      jQuery('html,body').animate({
                          scrollTop: $this.offset().top - 220
                      }, 500); 
  
          
      });
  }
      &lt;/script&gt;
      &lt;?php
  }
  </code></pre>
  <p>The error is being generated from this line:</p>
  <pre><code> swiperInstance.params.observer = true;
  </code></pre>