Disable full screen scroller on mobile


Topic: Disable full screen scroller on mobile

Co.m.media asked 5 years ago

Hello,

is there a way to disable the plugin on mobile?


Mateusz Łubianka staff answered 5 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,


Co.m.media answered 5 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 5 years ago

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

Best,


Co.m.media answered 5 years ago

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


Mateusz Łubianka staff answered 5 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,


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
  • User: 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