jQuery-switchButton icon indicating copy to clipboard operation
jQuery-switchButton copied to clipboard

Callback?

Open batbayar-su opened this issue 9 years ago • 3 comments

Is there any callback option?

batbayar-su avatar Jan 31 '16 17:01 batbayar-su

Right now i'm using like this

$("#choices .switch-button-button, #choices .switch-button-background").click(function(e) {
    if($('#choices .switch-button-background').hasClass('checked')) {
      //do something
    } else {
      //do something
    }
});

batbayar-su avatar Jan 31 '16 17:01 batbayar-su

Hi, unfortunately I don't have much time to maintain this old plugin and it's been really a long time since I used it...

If I am not mistaken, you should be able to use $('#myinput').change(function(e) { ... }) where #myinput is the checkbox that you initialized the plugin with!

olance avatar Feb 01 '16 09:02 olance

Make change " input type="checkbox" value="1" onchange="if(this.checked){ alert('a'); }else {alert('b')}"

mohak1990 avatar Jun 19 '16 08:06 mohak1990