A
A
Andrey Sergeev2019-08-04 09:41:59
JavaScript
Andrey Sergeev, 2019-08-04 09:41:59

Disable plugin on mobile?

Good afternoon, tell me how to disable the plugin on mobile devices?
The condition when changing the width does not fit. jQuery Form Style Plugin.

$(function() {
  
    $('.form-select').styler();
  
  });

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
camelCaseVlad, 2019-08-04
@camelCaseVlad

You can use this code from here

function isMobileDevice() {
    return (typeof window.orientation !== "undefined") || (navigator.userAgent.indexOf('IEMobile') !== -1);
};

I did a quick test on desktop (Firefox 68.0.1 iOs) and mobile (Safari iOs) and it works.
Browser on desktop
Browser on mobile
5d46bd1024a42318289643.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question