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?
$('#retailers tr').each(function()
{
$.each(this.cells, function()
{
var countLI = $("ul.links").children().length;
if(countLI + ":gt(1)")
{
$("ul.links li").css("background-color", "yellow");
}
});
});