I want to add a JavaScript snippet into an existing iFrame in the page using jQuery. I have the following code...
Code:
content = \"
You need to escape the /script. It apears.
/script
Do like google analitcs for instance
$("#iframe").contents().find("body").append(decodeURI("**%3Cscript%3E** alert(2) **%3C/script%3E**"));
replace the script and /script with this escaped ones
script
Hope it helps.