javascript - How to trigger different functions based on a radio button option? -
i'm having troubles trying trigger 2 different functions based on radio button option. i have autocomplete field, source must setted radiobutton option. can do? i have done this, far: var autocompleteone = [ "item 01", "item 02", "item 03", "item 04", "item 05" ]; var autocompletetwo = [ "item 01.2", "item 02.2", "item 03.2", "item 04.2", "item 05.2" ]; $('#options').blur(function(){ if(document.getelementbyid("optiona").attr(checked, true{ $("#autocompletecaseone").autocomplete({ source: autocompleteone }); } if(document.getelementbyid("optionb").attr(checked, true{ $("#autocompletecasetwo").autocomplete({ source: autocompletetwo }); } }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery...