bunnymatic/jquery.simpleimagecheck — pull request #2 by jewelsjacobs (2013-04-23 16:39:46+00:00)
Title: Added wasChecked option to persist checked state

Persist the checked state of radio / checkbox. Can be used with localStorage or cookies.
Here's an example using jquery-total-storage plugin - https://github.com/jarednova/jquery-total-storage:

$('#somediv').simpleImageCheck({
image: 'unchecked.png',
imageChecked: 'checked.png',
wasChecked: $.totalStorage('checked'),
afterCheck: function(isChecked) {
if (isChecked) {
$.totalStorage( 'checked', 'true' );
} else {
$.totalStorage( 'checked', 'false' );
}
}
});