Skip to main content

Bug Tracker

Side navigation

#5603 closed bug (invalid)

Opened December 05, 2009 11:58AM UTC

Closed December 10, 2009 05:49AM UTC

Troubles on using #myDiv[name=value] with multiple similar ids on IE, FF and Safari

Reported by: M'sieur Toph' Owned by:
Priority: minor Milestone: 1.4
Component: unfiled Version: 1.4a1
Keywords: Cc:
Blocked by: Blocking:


(I'm french, so please excuse my broken english).

I'm experiencing trouble on using the selector [attribute=value] with some navigators :

IE 6 (i'm dont have license for higher), Safari (3.2.1) and FireFox (3.0.15)

Imagine the following html code :



<script src=""></script>




$("#myDiv[name='1']").html("Test again");





<div id='myDiv' name='0'></div>

<div id='myDiv' name='1'></div>



I'm using the name attribute to store information about the divs without changing the id (and the associated CSS style used)

But, if you try to use the following js code on the not-first element, it will not return the attending value :

The first line will correctly fill the div 'myDiv' with 'Test'.

But the second one will not replacing the text by 'Test again' on FF, IE and Safari. It will work on Chrome and Opera, however.

Maybe, i'm doing something wrong but all my tests returned the same result.

Attachments (0)
Change History (1)

Changed December 10, 2009 05:49AM UTC by john comment:1

resolution: → invalid
status: newclosed

The name attribute is invalid on a div element - maybe you should use something else, like a class?