JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/ui-lightness/jquery-ui.css">
<div id='div2'>
    <ul id='ul2'>
        <li>4</li>
        <li>5</li>
        <li>6</li>
    </ul>
</div>
<br>

JavaScript

// Using "ul > li" selector
var result = $('#div2').children('ul > li');

$(document.body).append( result.length + ' LI were found using "ul > li".<br><br>');

// Using "ul:first > span" selector
var result = $('#div2').children('ul:first > span');

$(document.body).append( result.length + ' LI were found using "ul:first > span".<br><br>');

// Using "ul:first > li" selector
var result = $('#div2').children('ul:first > li');

$(document.body).append( result.length + ' LI was found using "ul:first-child > li".<br><br>');