get value of selected checkbox jquery
snippet in javascript

get value of selected checkbox jquery

user3923

$('#checkbox_id:checked').val();
//if checkbox is selected than gets its value

jquery get value checkbox checked

user9143

console.log($('input[name="locationthemes"]:checked').serialize());

//or

$('input[name="locationthemes"]:checked').each(function() {
   console.log(this.value);
});

get value of checked checkboxes jquery

user9013

var values = $('input[name=grepperRocks]:checked')
               .map(() => { return this.value }).get();