Uzyskaj wartość wybranego pola wyboru JQuery
$('#checkbox_id:checked').val();
//if checkbox is selected than gets its value
M. Wasim Abbasi
$('#checkbox_id:checked').val();
//if checkbox is selected than gets its value
$(":checkbox[value=4]").prop("checked","true");
$.each(arrayValues, function(i, val){
$("input[value='" + val + "']").prop('checked', true);
});
var grenval = $('.green').val();
$('.showCheckedValue').text(redval+'&'+grenval );