IE8 self closing tags loaded via Ajax.

Do not do this. Never use self closing tags for elements that can have content like <span id=”orderList”/> . It is ok to use <input type=”text” name=”ssn”/> since an input tag cannot have content. If you Ajax to load a self closing span or div tag, all the elements following that tag, a.k.a siblings, become the children of that tag. This behavior  was noticed in IE8 using jQuery.html() . Using jQuery.text() instead fixed the issue somewhat, but not completely, as it was not showing the text content in the span but at the bottom of the page.

Didn’t notice this issue in IE9, FF and Chrome.

Read more on self closing tags here:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: