Problem:
问题:
I have a set of custom checkboxes, presented as sliding on/off-buttons. These buttons toggle visibility of other elements. Up until now, I've used regular checkboxes, with an onclick-function, which performs a check on all settings, and updates the visibility of the elements. It worked perfectly, but after making the sliding buttons, and moving the onclick function to the corresponding checkbox labels, my visibility updates is one click delayed. The visibility update is performed before the checkbox is actually checked.I have a set of custom checkbo