I've been searching for a solution and experimenting with different methods, but I just can't seem to make it work.
Below is a CodePen example that showcases a custom checkbox with a toggle function to show/hide a div when checked, along with a regular checkbox that functions correctly.
I'm baffled as to why the custom checkbox doesn't change states when checked. When I remove the data-toggle attribute, the custom checkbox works fine, but once I reintroduce it, the functionality fails.
codepen.io/anon/pen/JzYOpZ
To clarify my issue, I want the checkbox to toggle between checked and unchecked states when clicked, while also displaying the collapsible div.