I have drop-down list with list of many options. Every time when a user make a choice then specific function starts.
$('#host').on('change', function() {
if ( $('#host').val() == 'stack' ) stack();
else if ( $('#host').val() == 'exchange' ) exchange();
else if ( $('#host').val() == 'something' ) something();
...
}
The list become very long because more function will be added. Is there a shorter way to execute name of the function from $('#host').val()
?