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

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -