How to load or not a JS script (into the head section) based on screen resolution?
on a website, I have these lines on the tag <script type="text/javascript" src="http://www.domain.com/js/jquery.min.js"></script> <script type="text/javascript" src="http://www.domain.com/js/jquery.colorbox.min.js"></script> <script type="text/javascript" src="http://www.domain.com/js/inner-code-colorbox.min.js"></script> Which are loading JS code, that shouldn't be loaded at all on portable systems Is there a way to do it? I tried in this way: <script type="text/javascript" media="only screen and (min-width: 950px)" src="http://www.domain.com/js/jquery.min.js"></script> But it's not working