Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Load my .js code, only when ‘x’ DIV exists Re: Load my .js code, only when ‘x’ DIV exists

#104682
TheDoc
Member

That’s because you’re just writing a bunch of text, it doesn’t know what to do with it.

http://stackoverflow.com/questions/1900874/how-to-add-anything-in-head-through-jquery-javascript

Skip the jQuery answer and find the JS one.