arthurgouveia/prettyCheckable — pull request #85 by gkostov (2014-07-17 12:56:13+00:00)
Title: Changed how the UI's kept in sync

This allows the UI to stay in sync even if the INPUT is toggled by code
outside of the plugin (either by JS or by the browser if the user clicks
a wrapping LABEL for example)

Calling `fakeCheckable.toggleClass('checked');` has the downside of not actually syncing the UI but just switching its state which in most cases is fine. But there are also cases when the source INPUT is toggled directly in some of various ways and then the UI can't catch up no matter how many times the user actions on the plugin's DOM elements.

There's only one concern I have about this commit and it relates to my complete ignorance regarding the Knockout library, and being unable to test if ko functionality is affected.

Also in `destroy()` it seems the source INPUT will be deleted from the DOM so there's no real need to detach events bound to it. But am I wrong?

Cheers