Skip to main content

Bug Tracker

Side navigation

#1601 closed bug (invalid)

Opened September 12, 2007 04:02PM UTC

Closed September 15, 2007 01:30AM UTC

Last modified March 15, 2012 01:00AM UTC

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"!

Attachments (0)
Change History (1)

Changed September 15, 2007 01:30AM UTC by john comment:1

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