Counting list items in each TD with jQuery?
-
Within each TD of the retailers div there is a UL, what I am trying to do is determine how many list items exist in each individual TD, if there is more than 1 list item I need to style it a specific way, as you can see below, however, when trying this code it applies the CSS to every LI, I am not sure where I am going wrong?
Can you put the example into a fiddle @ jsfiddle.net?
Just from a quick glance at the code, ":gt(1)" is a jQuery selector and shouldn't be used in a numerical comparison. Try this:Add a Comment