I\'m cheekily seeking a line or two of code on the fly here:
Could someone be kind enough to provide code to place in the head section of html doc that says if mobil
The best way to do it would be to add it around whole the actual mobile script inside the "foo.js" file. The DOM will have trouble loading the tag if you suddenly append it.
if (screen && screen.width > 480) {
// Whole your script here
}
Instead of:
if (screen && screen.width > 480) {
document.write('