Side navigation
#1277 closed bug (invalid)
Opened June 07, 2007 01:29PM UTC
Closed June 15, 2007 05:34AM UTC
Last modified June 21, 2007 03:59AM UTC
.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: |
Description
Given the following HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <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> </ul> <p><a href="">Paragraph Link</a></p> <p><a href="">Paragraph Link</a></p> <p><a href="">Paragraph Link</a></p> </div> </body> </html>
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.
It looks like I may be mistaken about whether this is not functioning correctly.