Is it possible to move a remote inline javascript widget to the very end of my html, and then, once the DOM is ready, inject the widget inside a specific element. I see inline javascript as a candidate for poor performance.
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It will depend entirely on how the widget in question is designed to be used. Looking briefly at the link you gave to TweetMeme, no, it doesn’t immediately look like you can do that. But check the docs, they may well have a means of allowing you to do it. If they don’t say they do, though, they’re probably relying on writing to the document as it’s being prepared, in which case you’re out of luck.
Edit: They’re using
document.write, it won’t work after-the-fact; see the source.