SyntaxFix
Write A Post
Hire A Developer
Questions
var length = $('#selected ul').children('li').length // or the same: var length = $('#selected ul > li').length
You probably could also omit li in the children's selector.
li
See .length.
.length