Sorry this isn't easy to explain..
When my script loads it reads some values to variables. eg:
enabled = $("#enabled").prop("checked") ? '1' : '';
local = $("#local").prop("checked") ? '1' : '';
senior = $("#senior").prop("checked") ? '1' : '';
Later in the script if a user has clicked on an element, I want to check if the selected element exists and is 1 or not.
$("body").on('change', '#enabled, #local, #senior', function() {
var Check = $(this).attr('id')
Check returns enabled, local or senior.
How can I use that to get the value from the relevant variable called enabled, local or senior ?
Thanks