[jQuery] Re: count lis within a ul.

2008-05-02 Thread Dave Methvin
So shouldnt it be $(div.belt ul li).length(); Nope, jQuery objects have a .size() method and a .length property, both return the number of elements in the object. I don't even see the size() method documented anymore so .length is the way to go. http://docs.jquery.com/Core

[jQuery] Re: count lis within a ul.

2008-04-30 Thread Dave Methvin
right now i am using this: it seems to return the total width of the li's or something. why isnt there some kind of countFirstGenerationChldren prototype? :P var itemLength = $(div.belt ul li).length; Looks like it should work; can you show your markup?

[jQuery] Re: count lis within a ul.

2008-04-30 Thread Wes Duff
I dont know if this is right or not but every time you use a function you should end it with () and (param1, param2, paremEnd) if you have parameters. So shouldnt it be $(div.belt ul li).length(); On Apr 30, 7:04 pm, Dave Methvin [EMAIL PROTECTED] wrote: right now i am using this: it