Get an array of checked checkboxes values using jQuery
$('#airlines input:checked').map(function(){
return $(this).val();
}).get();
// result: ["UN", "SU"]
related gist: https://gist.github.com/ctrl-alt-delete/9772283
Written by Vera Mazhuga
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Javascript
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#