Bug Tracker

Modify

Ticket #4622 (closed bug: worksforme)

Opened 4 years ago

Last modified 15 months ago

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

test-4622.html Download (501 bytes) - added by dmethvin 4 years ago.
Test of self-closing <div> tags for IE.

Change History

comment:1 Changed 4 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to worksforme

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.

Changed 4 years ago by dmethvin

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.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.