I have a style.css with a media query. In my javascript-file, I have a value for the desired mobile-width stored in a variable.
By changing the variable, I want to c
You can set the rule directly using .media.mediaText of document.styleSheets[0].cssRules
.media.mediaText
document.styleSheets[0].cssRules
document.styleSheets[0].cssRules[0].media.mediaText = /* new media rule here */;
plnkr http://plnkr.co/edit/qzLO5J4KlWZLQnjMIy7i?p=preview