Page 1 of 1

CheckBox question

Posted: Thu Jun 25, 2015 7:48 pm
by sdanigo

Hi,
I use this code on click event of a checkbox:

var checkBox = jQuery(this).find("input[type='checkbox']");
//This is your checked value.
var checked = checkBox.prop("checked");
//Output to console to check it out.
console.log("checked = " + checked);

First time I click, it is check but it return false
second time I click it is uncheck but it return true.

Is this normal ?

Thanks

Sylvain


CheckBox question

Posted: Fri Jun 26, 2015 8:01 am
by Serhii Kulibaba

Hello Sylvain,

Please use "value change" event instead of "click".