title: Make all select elements in the table as disabled on a particular condition
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>            function checkifassigned(callno)
                  {
                      $.ajax({
                          url: 'index.php?action=searchbookforassigningbarcode',
                          type: 'POST',
                          dataType: 'JSON',
                          data: {callno:callno},
                          success: function(data){
  
                              if (data.length)
                              {
                                  if(data[0]['DataAvail'] != 0)
                                  {
                                     for(var i in data)
                                     { 
                                          var issuehistory = data[i]['issuehistory'];
                                          for(var j in issuehistory)
                                          {
                                              $('.library_info_tbl').find('select').each(function () {          
                                          
                                              var id = $(this.id);
                                             
                                              if (id ==  issuehistory[j]['acquisitionno']) 
                                              {
                                                    $(this).prop("disabled", true);            
                                              }
                                          
                                          });
                                          }
                                       }
                                    }
                                 }
                              }
                          });
                      } </code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;table class="library_info_tbl"&gt;
          ...
          ...
            &lt;td class="text-center centeralign"&gt;&lt;div class="btn-group"&gt;&lt;input type="text" class="hide" id="acquisitionno1" value="16"&gt;
            &lt;select id="16" class="form-control"&gt;&lt;option value="Select"&gt;Select&lt;/option&gt;&lt;option value="Damaged"&gt;Damaged&lt;/option&gt;&lt;option value="Lost"&gt;Lost&lt;/option&gt;&lt;/select&gt;&lt;/div&gt;&lt;/td&gt;
                   ...
                   ...     
               &lt;td class="text-center centeralign"&gt;&lt;div class="btn-group"&gt;&lt;input type="text" class="hide" id="acquisitionno1" value="16"&gt;
            &lt;select id="17" class="form-control"&gt;&lt;option value="Select"&gt;Select&lt;/option&gt;&lt;option value="Damaged"&gt;Damaged&lt;/option&gt;&lt;option value="Lost"&gt;Lost&lt;/option&gt;&lt;/select&gt;&lt;/div&gt;&lt;/td&gt;
                 ...
                 ...
         &lt;/table&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>I have a table in web page which contain select elements with specific id assigned to them as shown in the above html code.</p>
  <p>Now I want to make all those select elements in the table as disabled if their id match with 'acquisitionno' in the loop.</p>
  <p>The above jQuery code does not make the desired select elements disabled.</p>
  <p>The data is:</p>
  <pre><code>           {
       &quot;_id&quot;: ObjectId(&quot;59fff82b1d78594010000029&quot;),
       &quot;book_id&quot;: NumberInt(4),
       &quot;bookadditionmode&quot;: &quot;General&quot;,
       &quot;callno&quot;: NumberInt(4),
       &quot;isbn&quot;: &quot;123456789&quot;,
       &quot;title&quot;: &quot;General Robotics Studies&quot;,
       &quot;subject&quot;: &quot;Robotics&quot;,
       ...
  
         &quot;issuehistory&quot;: [
          {
            &quot;student_id&quot;: NumberInt(2),
            &quot;student_name&quot;: &quot;Zulekha Fayaz&quot;,
            &quot;issue_date&quot;: ISODate(&quot;2017-11-05T23:00:00.0Z&quot;),
            &quot;due_date&quot;: ISODate(&quot;2017-11-15T23:00:00.0Z&quot;),
            &quot;acquisitionno&quot;: NumberInt(16),
            &quot;inserted_at&quot;: &quot;11/06/2017 07:09:32&quot;,
            &quot;inserted_by&quot;: NumberInt(1) 
          },
          {
            &quot;student_id&quot;: NumberInt(3),
            &quot;student_name&quot;: &quot;Nazia Ahmad&quot;,
            &quot;issue_date&quot;: ISODate(&quot;2017-11-05T23:00:00.0Z&quot;),
            &quot;due_date&quot;: ISODate(&quot;2017-11-15T23:00:00.0Z&quot;),
            &quot;acquisitionno&quot;: NumberInt(17),
            &quot;inserted_at&quot;: &quot;11/06/2017 07:09:32&quot;,
            &quot;inserted_by&quot;: NumberInt(1) 
          }  
        ],
  </code></pre>