Hi All,
I need to count the amount of LI's in a top level UL.
My top level menu has 6 items in it but this could dynamically change. I thought this could work but it is still counting the child li's too :(
var numTopNavItems = 0;
$("ul.rmHorizontal > li").each(function (i) {
numTopNavItems += i;
alert("numTopNavItems = " + numTopNavItems);
});
Any ideas why this might be?
Thanks, James