It seems there are many ways to do this, however, none of them make sense to me. If anyone can give me an example of how to add a tag and edit its attributes (no document.write mess) that works in all common browsers BUT IE, that would be great.
EDIT
I simply do not care if it works in IE or not. If it does, fine but I dislike IE so much anyway I will just ask people to change browsers since other stuff on the page I am creating does not work in IE.
It seems there are many ways to do this, however, none of them make
Share
Here is the easiest example of how to create a
<div>element and add it to the layout.DEMO: http://jsfiddle.net/XVaqY/
To make it not working in IE add any browser check. Something like that: