How to filter a number of divs based on what they have in their custom data attribute using jQuery? The problem is that the attribute can have more than 1 value
function filter(e) {
var regex = new RegExp('\\b' + e + '\\b');
$('.size').hide()
.filter(function () {
return regex.test($(this).data('size'))
}).show();
}