test for num of children jQuery code example Example: get children length jquery var count = $("#selected ul").children().length;