jQuery and passing variables from decision structure
I'm using jQuery and I'm having an issue with passing a variable to a
function from the value of a checkbox. I can pass to the function from a
Switch statement, but not from an If Then. I'm just looking for some
assistance as to why.
$("input[type=checkbox]").change( function() {
if($(this).is(":checked")){
passVar = ( $(this).val() );
addToOrder(passVar);
alert(passVar);
} else {
alert("off");
} });
Any assistance is greatly appreciated.
No comments:
Post a Comment