title: Find previously selected value of drop down list on change event
body: <pre><code>function LoadData(id) {
  var employeeId = $.trim($("#employeeId").val());
  var employeeType = $.trim($("#employeeType").val());
  
  var obj = "";
  var CityId = $.trim($("#ddlCity").val());
  obj = new ViewModel1(employeeId, employeeType, 0, $.trim($("#DeptName").val()), "", "", $.trim($("#SectionName").val()), CityId);
  var postedData = JSON.stringify(obj);
  
  Loader();
  $.ajax({
      //...........
      //...........
  })
  </code></pre>
  
  <p>}</p>
  
  <p>I have the above function and i want to get the previously selected value in the element #ddlCity. The above function is called from the line below.</p>
  
  <pre><code>@Html.DropDownGroupListFor(m =&gt; m.CityId, Model.GroupedTypeOptions, new { name = "ddlCity", id = "ddlCityName", @onchange = "javascript:LoadData(this.value)" })
  </code></pre>
  
  <p>var CityId = $.trim($("#ddlCity").val()); is giving me the CityId of my new selection in the dropdownlist. </p>
  
  <p>So how can i get the CityId of the previously selected value?</p>