I have implemented a unique custom CSS toggle switch to customize the appearance of my checkbox inputs. Check out the project on GitHub.
However, I am facing an issue where clicking on the checkbox toggles registers the click twice and does not change the checked value. The checkbox remains unchecked if it started off that way, and stays checked if initially checked.
To demonstrate this problem, I have created a fiddle: https://jsfiddle.net/w1ug4jdc/
The HTML code for the styled checkbox is as follows:
<label class="switch-light switch-candy" onclick="doSomething($(this))">
<input type="checkbox" />
<strong>
Wireless
</strong>
<span>
<span>Off</span>
<span>On</span>
<a></a>
</span>
</label>
You can find all the CSS styling in this file: https://github.com/ghinda/css-toggle-switch/blob/master/dist/toggle-switch.css