Question: how to get the old selected value of dropdown in javascript?
Answer: on('change', function () { //grab previous select var prevSel = $(this). data("prevSel"); //do what you want with the previous select var prevVal = prevSel. val(); var prevText = prevSel. text(); alert("option value - " + prevVal + " option text - " + prevText) //reset prev val $(this).