I am trying to insert script tag and its contents dynamically.
Now I have changed it to create a text node.
var text = "$(document).ready(function(){ $('.Picture1').onmouseover(function()
{$('.tooltip').show();});});"
insertScript(text );
function insertScript(script_text) {
var script_tag = document.createElement('script');
script_tag.type = "text/javascript";
var script = document.createTextNode(script_text);
script_tag.appendChild(script);
document.getElementsByTagName('head')[0].appendChild(script_tag);
}
I am trying to find it in script debugger (press F12 for IE) I am first inserting JQuery-1.7.1 dynamically and then the code above.
I want to insert both dynamically.
Thanks