html - Can we load different external links if the screen width is too small? -


i know if can load different external ressources (such jquery) depending on screen width, know can do

<link rel="stylesheet" media="screen , (min-device-width: 800px)" href="mobile.css" /> 

but can

<script media =" screen , (min-device-width: 800px)" src="https://ajax.googleapis.com/ajax/libs/jquerymobile/1.4.5/jquery.mobile.min.js"></script> 

i not think works css. works follows:

if (document.documentelement.clientwidth < 800) {     $.getscript('https://ajax.googleapis.com/ajax/libs/jquerymobile/1.4.5/jquery.mobile.min.js'); } 

Comments

Popular posts from this blog

Capture and play voice with Asterisk ARI -

java - Why database contraints in HSQLDB are only checked during a commit when using transactions in Hibernate? -