hendo13/EMSwitchBox — Issue #2: Track Changes to Hidden Checkbox
Author: mattwick
Created: 2012-02-03 01:19:48+00:00
State: open

Not that this is a real issue, but I've been having trouble binding the original checkbox to a function. I've spent the last few hours on it and have, so far, come up empty handed. I'm trying to do an jquery ajax post after the checkbox value has been changed. Any ideas.

The original checkbox has class of .published

Here is the jquery I'm trying to bind as a test.

$(".published").live('change', function(){
alert('switch is clicked!');
if($(this).is(':checked')){
alert('checked');
} else {
alert('un-checked');
}
});

Any help would be greatly appreciated. This plugin is awesome btw. Nice job!