Created
June 22, 2018 11:31
-
-
Save ShuvoHabib/f1e06c47c9458a9296af2ee0c8772994 to your computer and use it in GitHub Desktop.
Check Box onclick value change
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#squaredTwo").click(function(){ | |
if(jQuery(this).val() === "unchecked") { | |
$(this).attr('value', 'checked'); | |
console.log(jQuery("#squaredTwo").val()); | |
} else { | |
$(this).attr('value', 'unchecked'); | |
console.log(jQuery("#squaredTwo").val()); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment