javascript - Adding 'type' attribute to a script tag loaded by a dll -


i have menu control coming dll, need reference it. old script tag injected page has 'language' attribute. looking way add 'type' attribute after page has loaded.

i tried:

$("script").attr("type", "text/javascript"); 

but doesn't work ... suggestions, or possible?

i'm affraid it's not possible edit script tag. because mean script can unloaded, impossible, because code can executed.

so try, create second script tag has correct attributes:

var script = document.createelement("script"); script.src = "url"; script.type = "text/javascript"; $("head").append(script); 

Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -