Side navigation
#8911 closed bug (invalid)
Opened April 19, 2011 06:10AM UTC
Closed April 19, 2011 01:53PM UTC
the selector not working
| Reported by: | anonymous | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 1.next | 
| Component: | selector | Version: | 1.5.2 | 
| Keywords: | Cc: | ||
| Blocked by: | Blocking: | 
Description
<!DOCTYPE html>
<html>
<head>
<style>
div { float:left; }
span { color:blue; }
</style>
<script src="http://code.jquery.com/jquery-1.5.js"></script>
</head>
<body>
<div><ul>
<li>John</li>
<li>Karl</li>
<li>Brandon</li>
</ul></div>
<div><ul>
<li>Sam</li>
</ul></div>
<div><ul id="testing">
<li class="test-me">Glen</li>
<div>test</div>
<li class="test-me">Tane</li>
<li class="test-me">Ralph</li>
<li>David</li>
</ul></div>
<script>console.log($("#testing > li.test-me:nth-child(1)").text());</script>
</body>
</html>
Attachments (0)
Change History (1)
Changed April 19, 2011 01:53PM UTC by comment:1
| component: | unfiled → selector | 
|---|---|
| priority: | undecided → low | 
| resolution: | → invalid | 
| status: | new → closed | 
Thanks for taking the time to contribute to the jQuery project! That selector will not work in some browsers because your html is invalid. Cannot put a div inside a ul.
created test case