Bug Tracker

Ticket #1601 (closed bug: invalid)

Opened 15 months ago

Last modified 15 months ago

Square bracket [] selectors doesn't work!

Reported by: Greendrake Owned by:
Priority: critical Milestone: 1.2.1
Component: core Version: 1.2
Keywords: Cc:
Needs: Review

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

Changed 15 months ago by john

  • status changed from new to closed
  • resolution set to invalid

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.