I have a checkbox couple with values "new" or "existing" company.
$("input[name=company]:checked").val()
with jQuery shows me the value of the checked box.
Now if I do:
if ($("input[name=company]:checked").val() == "new") {
is_new_company = true;
} else {
is_new_company = false;
}
alert(is_new_company);
I get the correct booleans.
Doing the shortcut:
($("input[name=company]:checked").val() == "new") ? is_new_company = true : is_new_company = false;
I get nothing.. Why is that?