@mediaquery: can you disable scripts all over the web when a specific resolution is detected?

0

I have a page with many jquery animations, but these animations I only want to work on the original version of the page, that is, on the normal size page (it is for laptops, desktop PC and tablets) but I want to disable the animations in the mobile version (mobile). Can it be done? ... is that my animations do not look good on a small screen, as they are wasted ... I could simply delete the elements that are animated, and this would not show any animation, but that would not remove the loading weight because the jquery and the animations sheet codes keep running (running), I mean? ... then I want to know if this can be done: that when mediaquerie detects a specified resolution, that eliminates the scripts of the head (those that enable the jquery and the others), and this way my web for mobile is lighter

    
asked by user104554 09.11.2018 в 21:16
source

1 answer

0

You can try the following:

$( window ).resize(function() {
  if($(window).width() > 450)
  {
    //Animaciones aqui
  }
});
    
answered by 09.11.2018 в 21:46