I have two checkboxes which I have to run 3 different functions depending on what's checked by the user.
However I don't seem to be able to get the values correctly:
$('#checks').click(function(e) {
if (!$('#different-billing-address').is(":checked") && $('#ccheck').is(":checked")) {
openform();
}
if ($('#different-billing-address').is(":checked") && !$('#ccheck').is(":checked")) {
hideocp();
}
if (!$('#different-billing-address').is(":checked") && !$('#ccheck').is(":checked")) {
samedelivery();
}
});
Can someone explain to me why is this not working?
Thank you!
Aucun commentaire:
Enregistrer un commentaire