Topic: Disable full screen scroller on mobile

Co.m.media free asked 4 years ago


Hello,

is there a way to disable the plugin on mobile?


Mateusz Łubianka staff answered 4 years ago


I think you can use 'afterResize' callback and try to disable FSS. 

$(".full-screen-scroller").fullScreenScroller({
      afterResize: function() {
        var width = $(window).width();
        if(width < 768) {
          $('.full-screen-scroller').removeAttr('class');
        }
      }
    });

Best,


Co.m.media free answered 4 years ago


ok, but do you think it is possible to do this even if there is no integrated function?


Co.m.media free answered 4 years ago


Thanks for the reply, but is there no way to destroy the fullScreenScroller object when the window size is less than a certain number of pixels? In this way the problem is solved even if the user narrows the browser window.


Mateusz Łubianka staff commented 4 years ago

Unfortunately but there's no built-in feature to destroy it.

Best,


Mateusz Łubianka staff answered 4 years ago


Hi @Co.m.media,

You can try several options: * Checking screen width and initialize plugin only on desktop. * Detect mobile devices and not init plugin when it's true. More info about detect mobile devices: https://stackoverflow.com/questions/3514784/what-is-the-best-way-to-detect-a-mobile-device

Best,



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.11.0
  • Device: Mobile
  • Browser: Chrome
  • OS: Android
  • Provided sample code: No
  • Provided link: No