Bug Tracker

Opened 12 years ago

Closed 12 years ago

#8911 closed bug (invalid)

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:


<!DOCTYPE html> <html> <head>


div { float:left; } span { color:blue; } </style> <script src="http://code.jquery.com/jquery-1.5.js"></script>

</head> <body>


<li>John</li> <li>Karl</li> <li>Brandon</li>

</ul></div> <div><ul>



<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>



<script>console.log($("#testing > li.test-me:nth-child(1)").text());</script>

</body> </html>

Change History (1)

comment:1 Changed 12 years ago by Timmy Willison

Component: unfiledselector
Priority: undecidedlow
Resolution: invalid
Status: newclosed

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

Note: See TracTickets for help on using tickets.