Bug Tracker

Ticket #3762: jq1.3b1-filter-not.html

File jq1.3b1-filter-not.html, 741 bytes (added by garrett, 11 years ago)

demonstration of the $.filter(':not(.test-1,.test-2)') bug

Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2<html>
3  <head>
4    <title>jQuery 1.3b1</title>
5    <script src="jquery-1.3b1.js" type="text/javascript"></script>
6  </head>
7
8  <body>
9    <ul>
10      <li class="test-1">test-1</li>
11      <li class="test-2">test-2</li>
12      <li class="test-3">test-3</li>
13      <li class="test-4">test-4</li>
14      <li class="test-5">test-5</li>
15    </ul>
16  </body>
17
18  <script type="text/javascript">
19    $(function(){
20        // This is fine
21        $('li:not(.test-3,.test-4)').css({backgroundColor: 'red'});
22
23        // This triggers a bug in jQuery 1.3b1
24        $('ul>li').filter('li:not(.test-2,.test-4)').css({fontWeight: 'bold'});
25    });
26  </script>
27</html>