Skip to main content

Bug Tracker

Side navigation

#4622 closed bug (worksforme)

Opened May 04, 2009 05:41PM UTC

Closed May 05, 2009 12:39AM UTC

Last modified March 13, 2012 04:06PM UTC

Jquery cannot get .text() or .html() from Div in IE8

Reported by: ericbojo Owned by: john
Priority: minor Milestone: 1.3.2
Component: selector Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:

If you end a <div> tag with <div /> instead of <div> </div> you cannot get or set the inner html (= null) or text (= ""). I only tested in IE8, Using the $("#xxx").html(); and $("#yyy").text(); functions.

Attachments (1)
  • test-4622.html (0.5 KB) - added by dmethvin May 05, 2009 12:39AM UTC.

    Test of self-closing <div> tags for IE.

Change History (1)

Changed May 05, 2009 12:39AM UTC by dmethvin comment:1

resolution: → worksforme
status: newclosed

I am not seeing any problem with IE8 8.0.6001.18702 (the shipping version).

However, remember that *no* version of IE supports XHTML. The IE tag-soup parser often manages to make sense of whatever you throw at it, but any use of self-closing tags is not officially supported by Internet Explorer. jQuery doesn't have any control over this.