mattbryson / TouchSwipe-Jquery-Plugin

TouchSwipe is a jquery plugin to be used with jQuery on touch input devices such as iPad, iPhone etc.
http://labs.rampinteractive.co.uk/touchSwipe/
Other
4.05k stars 1.68k forks source link

Moving range slider right, invokes swiperight #365

Open ppetree opened 4 years ago

ppetree commented 4 years ago

Hey Matt, here's an interesting one for you:

In the page init I have:

  $("#settingsPage").on("swiperight", function () {
    goBack();;
  });

On the page I have:

   <input type="range" min="0" max="200" step="1" value="25">

When I move the slider to the right from the default of 25 to 100, the swiperight gets invoked.

I tried this:

  $("#settingsPage not:input").on("swiperight", function () {
    goBack();
  });

and this: $("#settingsPage").not(".no-swipe").on("swiperight", function () { app.views.main.router.back('/account/', {force: 'true', ignoreCache: true}); });

with this html:

   <input class="no-swipe" type="range" min="0" max="200" step="1" value="25">

I also tried with the class="noSwipe" as referenced here

Any suggestions on how to have a page swipe handler that works with the range slider? (BTW, I'm using this with Framework7 ver 5.x)

ppetree commented 4 years ago

Never mind. I added the elements to the exclude list and that worked.