JSFiddle - React, Tailwind, and code Playground
HTML
<select multiple>
<option value='one'>
one
</option>
<option value='two'>
two
</option>
<option value='three'>
three
</option>
</select>
JavaScript
var lastSelectedVal = '';
$(function() {
$('select').on('change', function() {
alert('current: ' + $(this).val() + ' last: ' + lastSelectedVal);
lastSelectedVal = $(this).val();
});
});