Bug Tracker

Modify

Ticket #6092 (closed bug: wontfix)

Opened 3 years ago

Last modified 3 years ago

IE7/8 Bug with id based searching

Reported by: Cameron Owned by:
Priority: Milestone: 1.4.1
Component: core Version: 1.4.1
Keywords: Cc:
Blocking: Blocked by:

Description

<div id="abc">

<div id="ghi">

test 1

</div> <div id="def">

test 2

</div>

</div>

<div id="jkl">

<div id="def">

test 3

</div>

</div>

<script language="JavaScript">

$('#abc #def').css("border","3px solid red"); $('#jkl #def').css("color", "green");

</script>

The 2nd line of the script will not function and returns a null. The last version that works properly is 1.2.6 I have tried all versions from 1.2.6 up through 1.4.1 and all are affected.

Change History

comment:1 Changed 3 years ago by john

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

You really shouldn't be using multiple identical IDs in a document - I recommend using classnames instead as that will avoid any potential collisions. IDs are meant to be unique across the entire document.

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.