You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I modified the code for the check boxes to hide the ones with (0) items after filtering.
var c = $(this), count = 0
if(result.length > 0){
count = jQ.where({ 'litType': c.val() }).count;
}
//hide the checkboxes if value is 0////////
if (count ==0) {
$('#'+c.val().replace(/\s/g, '')).hide();
} else {
$('#'+c.val().replace(/\s/g, '')).show();
}
c.next().text(c.val() + '(' + count + ')')
});```
I'm trying to figure out how to uncheck All and the items that are left so
the user can just pick the item they want. Currently they have to first
uncheck All, then check the item they actually want.
The text was updated successfully, but these errors were encountered:
I did do this which works but produces some unexpected filtering.
I have two different sections with checkboxes Literature Type and Product Type
After entering your search terms, the page refreshes and the checkboxes are all unchecked.
If I check off an item it either area, it works. If I select an item in one area and then the other, it gives unexpected results in the search.
function afterFiltered(){//Unchecks the boxes after a search
$('#litType_criteria :checkbox').prop('checked', false);
/$('#prodType_criteria :checkbox').prop('checked', false);
}
Thanks for the answer. But if all are unchecked by default, when you checked one of the checkbox, the counter of the others is reset(will be 0). Did you find any solution to this?
I modified the code for the check boxes to hide the ones with (0) items after filtering.
The text was updated successfully, but these errors were encountered: