Closed texelate closed 10 years ago
Thanks @texelate!
You should use a 2.x version - https://github.com/fronteed/iCheck/tree/2.x-beta, since a previous version doesn't handle the change
event.
Don't worry, checked
state is changed if visual state is updated. In most of the browsers you won't see any updates in the HTML, just because developer tools don't show these changes.
Actually, you don't need so much code from your example.
You can simply append this one before you include the iCheck:
window.icheck = {
checkboxClass: 'icheckbox_minimal-blue',
radioClass: 'iradio_minimal-blue'
};
Then, just add icheck
class to the inputs or any HTML elements with inputs inside for the checkboxes and radios customization.
iCheck applies changes itself, you don't have to add any code like $(this).removeAttr('checked')
.
Thanks @fronteed! I think I was getting confused because of the lack of the change event. I will try 2.x, thanks.
And thanks again for a great plugin!
Fantastic plugin!
One thing though, so that existing JavaScript validation works shouldn't you add the 'checked' attribute to the hidden input elements?
Currently I'm doing it thus:
iCheck doesn't seem to update the element at all. One thing I can't for the life of me figure out is how iCheck sets the GET/POST data to be sent. All that seems to update is the 'check' class gets added.