The thing I want to achieve is whenever the dropdown is changed I want the value of the dropdown before change. I am using 1.3.2 version of jQuer
please don't use a global var for this - store the prev value at the data here is an example: http://jsbin.com/uqupu3/2/edit
the code for ref:
$(document).ready(function(){
var sel = $("#sel");
sel.data("prev",sel.val());
sel.change(function(data){
var jqThis = $(this);
alert(jqThis.data("prev"));
jqThis.data("prev",jqThis.val());
});
});
just saw that you have many selects on page - this approach will also work for you since for each select you will store the prev value on the data of the select