With jQuery, it is easy to select elements with a given attribute value.
For example:
var elements = $(\'div[attr1=\"value1\"]\');
Find this solution quite simple.
$('[attr1="home"][attr2="settings"]')