Hi I have shared the code here : http://jsfiddle.net/jTAZ4/
Why am i getting the length as 0 although I can see an li with the specified class. any help is deeply appreciated.
I know this will work with find but just wondering why children selector doesn’t work.
That’s because the
<li>is not a direct children of that<div>.You should use
.find()instead of.children().