title: Getting the current position of the slide when you swipe on VueJS?
body: <p>So basically, i'm trying to get the position of the slide and then update the html by adding a class to that slide. But I can't figure out how to get the current position everytime I swipe, how to update the swipe_active data. </p>
  
  <p>This is the vue js file.</p>
  
  <pre><code>mounted(){
   let element = document.getElementById('mySwipe');
   if (window.innerWidth&lt; 550){
      window.mySwipe  =   Swipe (element, {
        startSlide: 1,
        auto: 0,
        autoRestart: true,
        continuous: true,
        disableScroll: true,
        stopPropagation: true,
        callback: function(index, element) {},
        transitionEnd: function(index, element) {}
      });
    }
    this.swipe_active = window.mySwipe.getPos();
  }
  </code></pre>
  
  <p>This is the html</p>
  
  <pre><code>  &lt;div  :class="{black_swipe : swipe_active === 0  }"&gt;&lt;/div&gt;
    &lt;div  :class="{black_swipe : swipe_active === 1  }"&gt;&lt;/div&gt;
  </code></pre>