Bug Tracker

Opened 13 years ago

Closed 13 years ago

Last modified 9 years ago

#1601 closed bug (invalid)

Square bracket [] selectors doesn't work!

Reported by: Greendrake Owned by:
Priority: critical Milestone: 1.2.1
Component: core Version: 1.2
Keywords: Cc:
Blocked by: Blocking:

Description

Assume we have this example html body:

<body> <div><div></div></div> </body>

and this JS:

$(function(){

alert($('div[div]').length);

});

Weird enough, but with jQuery 1.2 it says "0"!

Change History (1)

comment:1 Changed 13 years ago by john

Resolution: invalid
Status: newclosed

Right, in jQuery 1.2 you have to do :has(div) now - see the changelog: http://docs.jquery.com/Release:jQuery_1.2#Removed_Functionality

Note: See TracTickets for help on using tickets.