I have a number of arrays that contain multiple values.
var ab = [".inb", ".bhm", ".bab", ".mdr"];
var bc = [".thc", ".lsl", ".cma", ".vth"];
var de = [".myh", ".rte", ".bab", ".tzs"];
etc
I am using a select to specify which array to iterate through changing css values on a menu
$('#browse2').on('change', function () {
// the value of #browse2 would be ab or bc or de etc
var fv = $('#browse2').val();
for (i = 0; i < fv.length; ++i) {
$(fv[i]).css('opacity', '1.0');
}
});
But unfortunately this code only goes through the fv value itself (ie: ab), it doesn't call the array with the same variable name. How do I tell the for statement to use the variable with the same name as the fv value?
$(fv[i]).css('opacity', fv);????