I'm trying to write a jquery selector that will select objects that have the same value for two of their attributes.
Something like this:
$('div[attr1=attr2]')
Given:
<div attr1="foo" attr2="bar">A</div>
<div attr1="bar" attr2="bar">B</div>
<div attr1="foo" attr2="bar">C</div>
<div attr1="foo" attr2="foo">D</div>
I want it to return links to the B and D divs.
Any thoughts?