JSFiddle - React, Tailwind, and code Playground
HTML
<select class="chosen" style="width:400px;">
<option>Choose...</option>
<option>jQuery</option>
<option>MooTools</option>
<option>Prototype</option>
<option selected="selected">Dojo Toolkit</option>
</select>
JavaScript
$(document).ready(function(){
var previous;
$(".chosen").one('focus', function () {
// Store the current value on focus and on change
previous = this.value;
}).change(function() {
// Do something with the previous value after the change
console.log(previous);
// Make sure the previous value is updated
previous = this.value;
});
//console.log($(".chosen option:not(:selected)").last().val());
});