Modify ↓
Ticket #4622 (closed bug: worksforme)
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: | ||
| Blocking: | Blocked by: |
Description
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
Change History
comment:1 Changed 4 years ago by dmethvin
- Status changed from new to closed
- Resolution set to worksforme
Changed 4 years ago by dmethvin
-
attachment
test-4622.html
added
Test of self-closing <div> tags for IE.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

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.