¡@

Home 

2014/10/16 ¤W¤È 12:04:51

jquery Programming Glossary: loadjs

Call external JS file based on “media screen” value

http://stackoverflow.com/questions/15823137/call-external-js-file-based-on-media-screen-value

This loads JS files in the head element function loadJS url adding the script tag to the head var head document.getElementsByTagName.. and max width 599px match function Load a mobile JS file loadJS 'mobile.js' .listen enquire.register screen and min width 600px.. and max width 899px match function Load a tablet JS file loadJS 'tablet.js' console.log 'tablet loaded' .listen enquire.register..

Call external JS file based on “media screen” value

http://stackoverflow.com/questions/15823137/call-external-js-file-based-on-media-screen-value

2 Create a load function to load JS files script type text javascript This loads JS files in the head element function loadJS url adding the script tag to the head var head document.getElementsByTagName 'head' 0 var script document.createElement.. resize script type text javascript enquire.register screen and max width 599px match function Load a mobile JS file loadJS 'mobile.js' .listen enquire.register screen and min width 600px and max width 899px match function Load a tablet JS file.. .listen enquire.register screen and min width 600px and max width 899px match function Load a tablet JS file loadJS 'tablet.js' console.log 'tablet loaded' .listen enquire.register screen and min width 900px match function Load a desktop..