title: disable dropdown options based on the previously selected dropdown values using jquery or javascript?
body: <p>I have three dropdowns with the same options. What i want is, when i selecte an option from a dropdown, the same option from the other two dropdowns to be disabled, except from the first one (the option 'Select One').</p>
  
  <p>For this i am using the following logic, but here when one dropdown is selected to one value instead of disabling that selected value from the remaining two dropdowns, its disabling from the all of these three dropdowns this i don't want. The disabling of value should happen to the remaining ones but not for the current dropdown. </p>
  
  <p>How can i do this?</p>
  
  <pre><code>&lt;select class="form-control positionTypes"&gt;
      &lt;option value=""&gt;Select One&lt;/option&gt;
      &lt;option value="1"&gt;1&lt;/option&gt;
      &lt;option value="2"&gt;2&lt;/option&gt;
      &lt;option value="3"&gt;3&lt;/option&gt;
      &lt;option value="4"&gt;4&lt;/option&gt;
      &lt;option value="5"&gt;5&lt;/option&gt;
      &lt;option value="6"&gt;6&lt;/option&gt;
      &lt;option value="7"&gt;7&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;select class="form-control positionTypes"&gt;
      &lt;option value=""&gt;Select One&lt;/option&gt;
      &lt;option value="1"&gt;1&lt;/option&gt;
      &lt;option value="2"&gt;2&lt;/option&gt;
      &lt;option value="3"&gt;3&lt;/option&gt;
      &lt;option value="4"&gt;4&lt;/option&gt;
      &lt;option value="5"&gt;5&lt;/option&gt;
      &lt;option value="6"&gt;6&lt;/option&gt;
      &lt;option value="7"&gt;7&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;select class="form-control positionTypes"&gt;
      &lt;option value=""&gt;Select One&lt;/option&gt;
      &lt;option value="1"&gt;1&lt;/option&gt;
      &lt;option value="2"&gt;2&lt;/option&gt;
      &lt;option value="3"&gt;3&lt;/option&gt;
      &lt;option value="4"&gt;4&lt;/option&gt;
      &lt;option value="5"&gt;5&lt;/option&gt;
      &lt;option value="6"&gt;6&lt;/option&gt;
      &lt;option value="7"&gt;7&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>$("select.positionTypes").change(function () {
      $("select.positionTypes option[value='" + $(this).data('index') + "']").prop('disabled', false);
      $(this).data('index', this.value);
      $("select.positionTypes option[value='" + this.value + "']:not([value=''])").prop('disabled', true);
  });
  </code></pre>
  
  <p>here is the fiddle link <a href="https://jsfiddle.net/3pfo1d1f/4/" rel="nofollow">https://jsfiddle.net/3pfo1d1f/4/</a></p>