I use this code for listing all checked values in the array:
var healthSafety = $('input:checkbox[name=health_safety]:checked').map(function() {
return this.value + (' ');
}).get();
but the problem is, that comma, which separates them falls in the wrong place.
I get something like:
Tripple ladders ,Skylight ,Access to roof
but I want something like this:
Tripple ladders, Skylight, Access to roof.
I tried to put:
return this.value + (' ');
but it didn't helped
Is any way to fix it?