switchery
switchery copied to clipboard
Event handling
Hi, can you show a simple example of event handling. Like show/hide some elements by clicking switchery?
Thanks.
@lisandroprada The trick is to attach the event on the checkbox itself. Here's an example.
How would this look like for multiple Toggle-Buttons? Do I need to assign/unassign every toggle switch on creation/delete or can I catch the event with only a single listener for multiple switches?
The "click" event is not raised on the checkbox itself: https://jsfiddle.net/u9kbvu76/2/