title: Check if value is in dropdown list and disable it in Jquery
body: <p>How can i check if an item is in a select drop down list and disable it if it fulfills some condition?</p>
  
  <p>Thanks in advance!</p>
  
  <p>BTW i tried the following and nothing is happening</p>
  
  <pre><code>$('#select-box option').each(function() 
      {if (this.val() == item) 
         {$('#select-box option').attr("disabled","disabled");}});
  </code></pre>
  
  <p><em><strong>EDITED</em>*</strong></p>
  
  <p>The second code i used while debugging. It went through smoothly until i did the comparison with item. I am wondering if it is because of the this value. If so how do i overcome it?</p>
  
  <pre><code>function checkSelectBox(item){ &lt;!--alert(item);--&gt;
                                 $('#SCOPE option').each(function()
                                   {
                                     if($(this).val()==item)
                                     { alert('Camein')
                                     $(this).attr("disabled", "disabled");
                                       return false;    
                                      }
  
                                   });
                               }
  </code></pre>