So this works: $('.location').each(function(){ $('div.trip:visible:first', this).addClass('first'); });
but it seems a little verbose. Is there a way of making it more efficient?
So this works: $('.location').each(function(){ $('div.trip:visible:first', this).addClass('first'); });
but it seems a little verbose. Is there a way of making it more efficient?