Closed giovkanata closed 11 years ago
You can use ifToggled
callback instead:
$('input:checkbox').on('ifToggled', function() {
// do something
});
https://github.com/fronteed/iCheck#callbacks
Next version will support click handler on inputs.
Hi, when is coming next version which will support click handler on inputs? I cannot to write code for each event click on differentes radio buttons. Only recognise one. Maybe a longer explanation on plugin's documentation with different examples of use for each callback could be awesome.
using this library without support click handler maybe you'd find it dull.
This is a great plugin I'm trying to implement on my little project (in local), but after some attempts (and after carefully read the relative docs) I would need a little help for a simple questions. Following example is only for explaining purposes (really I've a hundred checkboxes on my form and all them are related to their "hidden div"), I've a simple "onclick" event on a checkbox (to shows/hides a div chained to it):
<input name="some_name" id="some_name" value="1" type="checkbox" onclick="if(this.checked) { jQuery('#hidden_div').slideToggle(800); } else { jQuery('#hidden_div').hide(400); }" />
When an user clicking the checkbox, the validation tool (for example) recognises the checkbox as "checked" but the onclick event doesn't fire.To avoid to rebuilt all conditions in the "onclick" events it's possible to read dinamically all setted conditions to then fire them with a iCheck callback? (using for example: .attribute('onclick')?) or is a bad idea?. I'm new on jQuery (I've started to study it only a few days ago) and any help will be really appreciate.