I want a selector like $(".author") that will select an element if “author” is the value of any attribute, not just class.
E.g. selector.text() should give “Emily Ekins” for each of the following pages:
<a href="http://reason.com/people/emily-ekins" rel="author">Emily Ekins</a>
or
<bloop href="http://reason.com/people/emily-ekins" id="author">Emily Ekins</a>
or
<blah href="http://reason.com/people/emily-ekins" class="author">Emily Ekins</a>
or
<tag href="http://reason.com/people/emily-ekins" random="author">Emily Ekins</a>
Is there any way to do this?
Example
Whew! That took some time. But this will check every single attribute of any given element, and if any attribute is
author, it will change the background color to red.