Disable Swipe On Slideshow On Mobile - Question | JoomShaper

Disable Swipe On Slideshow On Mobile

SG

Steven Gourlay

SP Page Builder 11 months ago

Is it possible to disable the finger scrolling the slideshow, i use the slideshow at the top of website a lot but i find on mobile its a pain as your finger moves the image when your trying to swipe up or down.

0
3 Answers
Atick Eashrak Shuvo
Atick Eashrak Shuvo
Accepted Answer
Support Agent 11 months ago #176251

Apologies for the inconvenience. It's possible to disable finger-scrolling for the slideshow. Could you share your website URL so I can assist you better?

0
SG
Steven Gourlay
Accepted Answer
11 months ago #176292
Hi please find link in private section
0
Atick Eashrak Shuvo
Atick Eashrak Shuvo
Accepted Answer
Support Agent 11 months ago #176315

Hello There,

Apologize for the issue you're experiencing. Please add the following JS code to your Template Options -> Custom Code -> Custom JavaScript

jQuery(document).ready(function ($) {

  function isMobile() {
    return /Mobi|Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
  }
  setTimeout(function () {
    if (isMobile()) {
      $('.sppb-addon-sp-slider').each(function () {
        var $slider = $(this);
        var instance = $slider.data('jsSlider');

        if (instance) {
          instance.onDragStart = function (e) { };
          instance.onDragMove = function (e) { };
          instance.onDragEnd = function (e) { };
          instance.$outerStage.off('touchstart.jsSlider touchmove.jsSlider touchend.jsSlider touchcancel.jsSlider');
        }
      });
    }
  }, 1000);
});

This should resolve the problem. Please let us know if you need any further assistance!

Best regards

0