O'Reilly logo
  • Ivan Petrov thinks this is interesting:

        // remove elements using a function
        $('img').filter(function(index) {
            return this.getAttribute("src") == "peony.png" || index == 4;
        }).css("border", "thick solid red")
    });   

From

Cover of Pro jQuery

Note

Filtering with a function. nice!!