Bug Tracker

Opened 10 years ago

Closed 10 years ago

#5256 closed bug (invalid)

$(...).remove() in IE6

Reported by: alelgert@… Owned by:
Priority: major Milestone: 1.4
Component: core Version: 1.3.2
Keywords: remove() IE 6 IE6 ie6 IE 6 Cc:
Blocked by: Blocking:

Description

Hello,

there is a Browser related difference in the functionality of remove().

Just create two elements with the same ID and IE 6 is not able to remove them all.

In IE8 and Firefox 3.5.3, the function works as said in the documentation, but not in IE6.

Example code:

<table border>

<tbody>

<tr id="user_2">

<td> </td> <td>2</td>

</tr> <tr id="user_2">

<td> </td> <td>2</td>

</tr>

</tbody>

</table> <script>

$(document).ready(function(){

$("tr#user_2").remove();

});

</script>

Greetings,

Alexander Elgert

Change History (1)

comment:1 Changed 10 years ago by dmethvin

Resolution: invalid
Status: newclosed

A document that contains two elements with the same id attribute is invalid.

http://www.w3.org/TR/html401/struct/global.html#h-7.5.2

"id = name [CS] This attribute assigns a name to an element. This name must be unique in a document."

Note: See TracTickets for help on using tickets.