Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

methods & callbacks #3

Open
pcout opened this issue Sep 23, 2014 · 10 comments
Open

methods & callbacks #3

pcout opened this issue Sep 23, 2014 · 10 comments

Comments

@pcout
Copy link

pcout commented Sep 23, 2014

Are there any methods or callbacks available (check, uncheck, toggle, disable, enable, update, destroy, etc) ?

thanks

@fntneves
Copy link
Owner

Not yet, but would be a great improvement.

Added to to-do list !

@pcout
Copy link
Author

pcout commented Sep 23, 2014

ok. looking foward to it.

@pcout
Copy link
Author

pcout commented Dec 5, 2014

+1 to this

@fntneves
Copy link
Owner

fntneves commented Dec 5, 2014

So, please tell me specifically which callbacks you want, and next week I'll tag a new release 👍

@pcout
Copy link
Author

pcout commented Dec 6, 2014

The callbacks would be:

ifClicked
user clicked on a customized input or an assigned label

ifChanged
input's checked or disabled state is changed

ifChecked
input's state is changed to checked

ifUnchecked
checked state is removed

ifToggled
input's checked state is changed

ifDisabled
input's state is changed to disabled

ifEnabled
disabled state is removed

ifDestroyed
customization is just removed

@fntneves
Copy link
Owner

I was thinking the following:

The destroy callback makes sense, but I think that you can apply those events directly to the input, once it still exists. Anyway, are you looking for a simplified way, for doing it when input have no ID's ?

Maybe I should remove the auto-generated ID's in a future v2.

@pcout
Copy link
Author

pcout commented Dec 17, 2014

I think alll the events are very usefull but the ifChecked and ifUnchecked events would be very appreciated.

Thanks

@fntneves
Copy link
Owner

But you still can use this:

$(".labelauty").click( function(){
  if( $(this).is(':checked') )
    alert("checked");
});

Yes, they are, but most of them can be defined directly to the input (except the destroy event that refers to plugin, exclusively).

@lenamtl
Copy link

lenamtl commented Dec 23, 2014

+1

1 similar comment
@askie
Copy link

askie commented Dec 27, 2014

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants