Bug Tracker

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#1277 closed bug (invalid)

.not() method not functioning as expected.

Reported by: brian Owned by:
Priority: critical Milestone: 1.1.3
Component: core Version: 1.1.2
Keywords: selector, not Cc:
Blocked by: Blocking:


Given the following HTML: {{{<!DOCTYPE HTML PUBLIC "-W3CDTD HTML 4.01 TransitionalEN"> <html>

<head> <title></title> </head> <body>

<script src="jquery.js"></script> <div id="document">

<ul class="menu">

<li><a href="">Menu Link</a></li> <li><a href="">Menu Link</a></li> <li><a href="">Menu Link</a></li>


<p><a href="">Paragraph Link</a></p> <p><a href="">Paragraph Link</a></p> <p><a href="">Paragraph Link</a></p> </div>



The following two statement should yield identical selection results: {{{$("#document a").not(".menu a"); $("#document a").not($(".menu a"));}}}

However, the first statement returns all 6 <a> elements, while the second (properly) only returns the bottom 3.

Change History (2)

comment:1 Changed 16 years ago by brian

It looks like I may be mistaken about whether this is not functioning correctly.

comment:2 Changed 16 years ago by brandon

Resolution: invalid
Status: newclosed

Yeah this was explained very well on the mailing list ... closing out as invalid.

Note: See TracTickets for help on using tickets.