At the moment I am using the following bit of code to only get the values of checked checkboxes, however I am sure that there is an easier way that this.
if ($('#OPTtags-adventure-diving').is(':checked')) {
var OPTtags-adventure-diving = $('#OPTtags-adventure-diving').val()
} else var OPTtags-adventure-diving = '';
if ($('#OPTtags-master-scuba-diver').is(':checked')) {
var OPTtags-master-scuba-diver = $('#OPTtags-master-scuba-diver').val()
} else var OPTtags-master-scuba-diver = '';
Is there?
Marvellous,
I have not checked this, but how about
var OPTtags-master-scuba-diver = $('#OPTtags-adventure-diving:checked').val()Then your variable will be
undefinedor the value.