JQuery media query request width value

Is it possible if jQuery or something else change the width of @media query css while the page is working?

So for example, if in style.css I have

 @media screen and (min-width: 400px) { /*whatever*/ } 

to change it to 500px after loading the website

+7
source share
1 answer

This is not possible using the traditional method. You must insert full css through jQuery. For example, for example:

  $('body').append("<style type='text/css'>@media screen and (min-width: 500px) { /*whatever*/ }</style>"); 
+8
source

All Articles