Chcę przejść przez pole wyboru „locationthemes” i zbudować ciąg ze wszystkimi wybranymi wartościami. Zatem po zaznaczeniu pola wyboru 2 i 4 wynik będzie wyglądał następująco: „3,8”
<input type="checkbox" name="locationthemes" id="checkbox-1" value="2" class="custom" />
<label for="checkbox-1">Castle</label>
<input type="checkbox" name="locationthemes" id="checkbox-2" value="3" class="custom" />
<label for="checkbox-2">Barn</label>
<input type="checkbox" name="locationthemes" id="checkbox-3" value="5" class="custom" />
<label for="checkbox-3">Restaurant</label>
<input type="checkbox" name="locationthemes" id="checkbox-4" value="8" class="custom" />
<label for="checkbox-4">Bar</label>
Sprawdziłem tutaj: http://api.jquery.com/checked-selector/, ale nie ma przykładu, jak wybrać grupę checkbox po jej nazwie.
Jak mogę to zrobić?