[jQuery] limiting # of elements by attr()

[jQuery] limiting # of elements by attr()


Id like to run though all the elements of a particular class/name on a
page and unhide only the first of each that have a particular
attribute. for example imagine a table with many img tags, and we
want to show only one of each href.
var id;
var singleton = function() {if((this != id) && (id = this))
{return true} else {return false}}
$("img").hide().filter(singleton).show();
but how to have the singleton function check the attribute value for
src= ??