Solution for "jquery checkbox checked on click"

//using plane javascript if(document.getElementById('on_or_off_checkbox').checked) { //I am checked } //using jQuery if($('#on_or_off_checkbox').is(':checked')){ //I am checked }

jQuery is checkbox checked

// Check a checkbox $(selector).prop('checked', true); // Un-check a checkbox $(selector).prop('checked', false); // Determine if checked or not isChecked = $(selector).prop('checked');

jquery in checkbox checked

$('input[type="checkbox"]').click(function(){ if($(this).is(":checked")){ //input element where you put value $("#isClicked").val("Yes"); // console.log($("#isClicked").val()); } else if($(this).is(":not(:checked)")){ $("#isClicked").val(""); // console.log( $("#isClicked").val()); } });

checkbox click event jquery

Similar codes for "jquery checkbox checked on click"


Latest 'Javascript' questions

Added before "jquery checkbox checked on click"