Check out my work on JSFiddle: https://jsfiddle.net/pb23Ljd8/5/
I've utilized Bootstrap nav-pills to display all products and categorize them like this:
https://i.sstatic.net/oQxTk.png
The checkboxes are based on this design:
To keep track of the checked products in each tab, I have implemented the following code:
jQuery(document).ready(function($) {
jQuery(".select-product").change(function() {
jQuery(".counter").text(jQuery("[type='checkbox']:checked").length);
});
});
However, there seems to be an issue with the glyphicon check icons not showing up on the second and third tabs. Despite this, the counter increments correctly when selecting products from these tabs. The challenge lies in ensuring that the products are visually checked across all tabs for a seamless user experience.
Any suggestions on how to achieve this?
Edit: It's worth mentioning that the product list is dynamically fetched from CMS, which might be contributing to the problem due to ID duplication.