switchery icon indicating copy to clipboard operation
switchery copied to clipboard

Event handling

Open lisandroprada opened this issue 10 years ago • 3 comments

Hi, can you show a simple example of event handling. Like show/hide some elements by clicking switchery?

Thanks.

lisandroprada avatar Apr 05 '15 18:04 lisandroprada

@lisandroprada The trick is to attach the event on the checkbox itself. Here's an example.

abpetkov avatar Apr 06 '15 13:04 abpetkov

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?

ghost avatar May 12 '15 18:05 ghost

The "click" event is not raised on the checkbox itself: https://jsfiddle.net/u9kbvu76/2/

acetous avatar Nov 13 '15 11:11 acetous