1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" |
---|
2 | "http://www.w3.org/TR/html4/strict.dtd"> |
---|
3 | <html> |
---|
4 | <head> |
---|
5 | <meta http-equiv="Content-type" content="text/html; charset=utf-8"> |
---|
6 | <title>jquerybug</title> |
---|
7 | <script src="jquery-1.3.1.min.js" type="text/javascript" charset="utf-8"></script> |
---|
8 | <style type="text/css" media="screen"> |
---|
9 | div { |
---|
10 | border: 1px solid red; |
---|
11 | padding: 20px; |
---|
12 | } |
---|
13 | </style> |
---|
14 | </head> |
---|
15 | <body> |
---|
16 | <div> |
---|
17 | Containing div needed to reproduce bug in first case. |
---|
18 | |
---|
19 | <div class="className"> |
---|
20 | Div.className 1. |
---|
21 | </div> |
---|
22 | |
---|
23 | <div class="className"> |
---|
24 | Div.className 2. |
---|
25 | </div> |
---|
26 | </div> |
---|
27 | <script type="text/javascript" charset="utf-8"> |
---|
28 | document.write('<p>1. "div.className:not(:first).length" should equal 1; actual value: ' + $("div.className:not(:first)").length); |
---|
29 | document.write('<p>2. ".className:not(:first).length" should equal 1; actual value: ' + $(".className:not(:first)").length); |
---|
30 | </script> |
---|
31 | </body> |
---|
32 | </html> |
---|