Side navigation
#9882 closed bug (duplicate)
Opened July 21, 2011 04:26PM UTC
Closed July 21, 2011 04:44PM UTC
Last modified March 14, 2012 04:15AM UTC
:nth-child(an+b)
Reported by: | StefanoVollono | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.6.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The bug is on Safari and Chrome.
The selector :nth-child(an+b) when combined ONLY with multiple selections, for example:
$("#element:nth-child(an+b) , #element2:nth-child(an+b)")
does not appear to be working properly.
EXAMPLE
<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "http:www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("ul#firstlist li:nth-child(3n+3),ul#secondlist li:nth-child(3n+3)").each(function(){
$(this).css("color","red");
});
});
</script>
</head>
<body>
<p><strong>First List</strong></p>
<ul id="firstlist">
<li>uuuuuuuuu</li>
<li>uuuuuuuuu</li>
<li>uuuuuuuuu</li>
<li>uuuuuuuuu</li>
<li>uuuuuuuuu</li>
<li>uuuuuuuuu</li>
<li>uuuuuuuuu</li>
<li>uuuuuuuuu</li>
<li>uuuuuuuuu</li>
<li>uuuuuuuuu</li>
</ul>
<p><strong>Second List</strong></p>
<ul id="secondlist">
<li>aaaaaaaaaaaaaaaaa</li>
<li>aaaaaaaaaaaaaaaaa</li>
<li>aaaaaaaaaaaaaaaaa</li>
<li>aaaaaaaaaaaaaaaaa</li>
<li>aaaaaaaaaaaaaaaaa</li>
<li>aaaaaaaaaaaaaaaaa</li>
<li>aaaaaaaaaaaaaaaaa</li>
<li>aaaaaaaaaaaaaaaaa</li>
<li>aaaaaaaaaaaaaaaaa</li>
</ul>
</body>
</html>