Assume we\'re having a list with 5 items and we want to apply some specific styles to the first or the last child. But the functionality of this list will requi
Do you mean something like this?
var notHidden = $('div').not('.hide'); notHidden.first().css('color', 'red'); notHidden.last().css('color', 'red');