I have an unordered list with multiple properties per element and I want to find all elements that have both properties.
var results = $('#mylist').find(function() {
return
$(this).attr('data-label') == 'red' &&
$(this).attr('data-size') == 1;
});
I attached an example in the link below:
Just use a single selector:
Example:
http://jsfiddle.net/niklasvh/RyR87/