So this fiddle which doesn't work http://jsfiddle.net/1auhde3L/ is based on this fiddle http://jsfiddle.net/B9Hnu/125/ which does work, but it doesn't take into account how my html is set out using data-category and the tags in the rel or ID tags of the checkboxes.
here's the jquery...
$(function() {
var $checkboxes = $("input[id^='type-']");
$('input[type=checkbox]:checked').attr('checked', false);
$checkboxes.change(function() {
console.log($('input[type=checkbox]:checked').length);
if( $('input[type=checkbox]:checked'
).length>0)
{
var selector = '';
$checkboxes.filter(':checked').each(function() { // checked
//selector += '.' + this.id.replace('type-', '') + ', ';
selector += "[data-category~='" + element.id + "']";
// builds a selector like '.A, .B, .C, '
});
selector = selector.substring(0, selector.length - 2); // remove trailing ', '
$('.results > div').hide() // hide all rows
.filter(selector).show(); // reduce set to matched and show
}else
{
$('.results > div').show()
}
});
});