D
D
danilr2020-02-29 17:04:32
JavaScript
danilr, 2020-02-29 17:04:32

How to connect the swipe tracking plugin?

I'm trying to connect the swipe tracking plugin, I'm doing everything according to the documentation (the project is on a webpack assembly), but I get an error, I think that I'm connecting it incorrectly. labs.rampinteractive.co.uk/touchSwipe/docs
do this npm install jquery-touchswipe --save
then call the mounted method

touchSwipe() {
      $(function() {  
        $("#plan").swipe({
          swipeRight:function(event, direction, distance, duration, fingerCount) {
            this.isPopupPlans = false;
          }
        });
      });
    },

The error is this.
5e5a6edfbe114015558741.png
I guess I need to somehow import the plugin, I made such attempts, unsuccessfully
import swipe from 'jquery-touchswipe';
window.jQuery.swipe = swipe;

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question