Can you say me what i did wrong?
When i make a function and make a onchange=”function()” it works.
<input type="checkbox" name="test" value="bar" />
$('input[name=test]').change(function(){
if($('input[name=test]').is(':checked')){
alert('Checked');
} else {
alert('Not checked');
}
});
It works here so it should also work fine for you .
http://jsfiddle.net/Sz3BK/
Which jquery version are you using ?