How to disable Jquery script on mobile devices? It's possible?

0

I'm just wanting to disable my Jquery script, so as not to run on devices smaller than 768px, is it possible?

    
asked by anonymous 01.12.2016 / 11:56

1 answer

0

You can put a condition if the width of the screen is greater than 768, run the script, otherwise nothing will be executed.

if ($(window).width() > 768) {
  //Codigo
}
    
01.12.2016 / 11:59