Easiest to explain by showing code:
var delta_selected = false;
var magma_selected = false;
var aqua_selected = false;
// Somewhere in my functions...
if (sumthing == 'sumthing1') {
topic = 'delta';
} else if (sumthing == 'sumthing2') {
topic = 'magma';
} else {
topic = 'aqua';
}
// Then assign it (so if topic is delta, then delta_selected = true)
topic + "_selected" = true;
This last line isn't working. Syntax error.
I need help to figure out how to do this. Thanks!