Last post Sep 28, 2017 09:19 AM by Eric Du
Sep 26, 2017 05:43 PM|Bashin|LINK
Hi guys I have a question.
In My codesample http://jsfiddle.net/n3EmN/3/
I have a list and multiple checkboxes for filters what should I do to add a count next to each checkbox with how many items are visible in the list.
and how do I hide the checkboxes that has zero items that works with current checkbox selections.
Sep 28, 2017 09:19 AM|Eric Du|LINK
According to your description and link, I checked your code in my side, here are my solutions of your two problems:
1. First issue:
(1) when you checked red, "Scarlet Carnation" and "Indian Paintbrush" show, you could found these two divs(use display equal to 'block') in jQuery,
(2) then for loop these divs, get data-category value, to disable the other option. Like "Indian Paintbrush", the data-category property value equal to "red medium north-america",
(3) then you could set medium and north-america option display property to enable, then set other to disable.
2. Second issue:
About how to get the count of items in the right side, i think you could use jQuery selector to find the class equal to flower and display property value equal to block.