Disable select function Jquery 1.9
<p>The following script works in all versions of Jquery except 1.9 (ahhh). It's very simple I have 5 dropdown list with the same 20 options in each list. Everytime they choose one option it is disabled and can not be chosen in the next list. And before anyone mentions the idea of using a checkbox function I did this already, and it worked great, but the big man upstair decided they want me to rewrite this script preferable.</p>

<pre><code>    $("select").change(function () {
    var $this = $(this);
    var prevVal = $this.data("prev");
    var otherSelects = $("select").not(this);
    otherSelects.find("option[value=" + $(this).val('') + "]").prop('disabled', true);
    if (prevVal) {
        otherSelects.find("option[value=" + prevVal + "]").prop('disabled', false);
    }

    $this.data("prev", $this.val());
});
 function clearForm(form) {
 // iterate over all of the inputs for the form
 // element that was passed in
 $(':input', form).each(function() {
 var type = this.type;
 var tag = this.tagName.toLowerCase(); // normalize case
 // it's ok to reset the value attr of text inputs,
 // password inputs, and textareas
 if (type == 'text' || type == 'password' || tag == 'textarea')
  this.value = "";
// checkboxes and radios need to have their checked state cleared
// but should *not* have their 'value' changed
else if (type == 'checkbox' || type == 'radio')
  this.checked = false;
// select elements need to have their 'selectedIndex' property set to -1
// (this works for both single and multiple select elements)
else if (tag == 'select')
  this.selectedIndex = -1;
 });
 };
</code></pre>
