Jump to content

KhushbuJ

Members
  • Posts

    1
  • Joined

  • Last visited

KhushbuJ's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. First of all, Both select tags must have unique ids. In question, you are using same id "cars". which won't work. So say for example, second select tag has id "cars2". In that case, you can disable option chosen in first select tag from second select tag as below: $("#cars").change(function(){ $('#cars2 option').removeAttr("disabled"); $('#cars2 option[value="'+$(this).val()+'"]').attr("disabled", true); }); You should not remove option from select tag, as we can't get it back once removed. So we are using disable method.
×
×
  • Create New...