I am facing a Twitter Timeline widget problem, but the problem applies to any script.
I want to embed the Twitter Timeline widget (the end result is an iframe). It seems that the way to add an iframe is to insert a script in a message that will call another script with functions that will then execute the function to load / create the final iframe.
<script>
!function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0], p = /^http:/.test(d.location) ? 'http' : 'https';
if (!d.getElementById(id)) {
js = d.createElement(s);
js.id = id;
js.src = p + "://platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js, fjs);
}
}(document, "script", "twitter-wjs");
</script>
- (post1, post2, post3), . , Dom, Ajax Dom. Dom, . ( dettaching - #ids).
, iframe , script , . ( dumb script). iframe Twitter, iframe, Youtube.
- ?
.
script, , , twitter script . script , script iframe. , iframe (ajax). head script, iframes .
"" .
, , script ( script).
Update2
http://jsfiddle.net/KsFJR/