title: Jquery Autocomplete is not working in Bootstrap Modal
body: <p>I have used some code of Jquery Autocomplete and loading data from php array. This code is working fine when I am using "Auto Complete Text Box" in the same page but not working when using the same "Auto Complete Text Box" in Bootstrap Modal Dialog.</p>
  
  <p>Following is my code</p>
  
  <p>------------------JS Code-------------------------</p>
  
  <pre><code>var availableTags=[]; // json data coming from php code
  function showAutoComplete(element_id) {
      $("#" + element_id).autocomplete({
          source: availableTags,
          minLength: 1,
          select: function (event, ui) {
              $("#" + element_id).val(ui.item.label); // display the selected text
              $("#" + element_id + "Id").val(ui.item.value); // save selected id to hidden input
              return false;
          },
          change: function (event, ui) {
              $("#" + element_id + "Id").val(ui.item ? ui.item.value : 0);
          }
      });
      console.log(availableTags);
  }
  </code></pre>
  
  <p>------------------------Modal Code---------------------</p>
  
  <pre><code>&lt;div id="myModal" class="modal fade" role="dialog"&gt;
    &lt;div class="modal-dialog" style="width: 800px !important;"&gt;
      &lt;!-- Modal content--&gt;
      &lt;div class="modal-content"&gt;
        &lt;div class="modal-header"&gt;
          &lt;button type="button" class="close" data-dismiss="modal"&gt;&amp;times;&lt;/button&gt;
          &lt;h4 class="modal-title"&gt;Add Corporate Experience&lt;/h4&gt;
        &lt;/div&gt;
        &lt;div class="modal-body"&gt;
          &lt;div class="col-md-12" id="career_profile_form"&gt;
            &lt;div class="form-group"&gt;
              &lt;div class="col-sm-6"&gt;
                &lt;div class="ui-widget"&gt;
                  &lt;input type="hidden" name="careerFormCompanyId" id="careerFormCompanyId"/&gt;
                  &lt;input  placeholder="Company Name" id="careerFormCompany" onkeyup="showAutoComplete('careerFormCompany')" name="careerFormCompany" class="form-control"/&gt;
                &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="col-sm-3"&gt;
                &lt;input type="text" name="careerFormRole" id="careerFormRole" placeholder="Role" class="form-control"/&gt;
              &lt;/div&gt;
              &lt;div class="col-sm-3"&gt;
                &lt;input type="text" name="careerFormYears" id="careerFormYears" placeholder="Years" class="form-control"/&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;?php
              if (isset($aCompanyQuestionList) &amp;&amp; is_array($aCompanyQuestionList) &amp;&amp; !empty($aCompanyQuestionList)) {
                  $col = 0;
                  foreach ($aCompanyQuestionList as $key =&gt; $value) {
                      ?&gt;
            &lt;?php if ($col == 0) { ?&gt;
            &lt;h3 id="other_company_heading1"&gt;&lt;/h3&gt;
            &lt;p&gt;Please provide appropriate responses about your experience in this company from a gender diversity perspective .&lt;br/&gt; Your responses are fully confidential, not displayed or stored in your profile. They are added to the overall company’s ratings given by others and averaged out&lt;/p&gt;
            &lt;?php } ?&gt;
            &lt;div class="col-md-12"&gt;
              &lt;?php
                $career_rating1 = "1";
                if (isset($aUnSerialized) &amp;&amp; is_array($aUnSerialized) &amp;&amp; !empty($aUnSerialized)) {
                    $career_rating = $aUnSerialized[$col + 1];
                }
                ?&gt;
              &lt;div class="row"&gt;
                &lt;div class="col-sm-8 list-style-job"&gt;
                  &lt;ol&gt;
                    &lt;li&gt;&lt;span&gt;&lt;?php echo $col + 1; ?&gt;&lt;/span&gt;&lt;?php echo $value-&gt;question; ?&gt;&lt;/li&gt;
                  &lt;/ol&gt;
                &lt;/div&gt;
                &lt;div class="col-sm-4 rating"&gt;
                  &lt;input type="hidden" name="questionId[]" value="&lt;?php echo $value-&gt;id; ?&gt;"/&gt;
                  &lt;input type="radio" class="career_ratings" id="career_star&lt;?php echo $col; ?&gt;1" name="career_rating_answer[&lt;?php echo $col; ?&gt;]" value="1" /&gt;
                  &lt;label  for="career_star&lt;?php echo $col; ?&gt;1" title=""&gt;&lt;/label&gt;
                  &lt;input type="radio" class="career_ratings" id="career_star&lt;?php echo $col; ?&gt;2" name="career_rating_answer[&lt;?php echo $col; ?&gt;]" value="2"/&gt;
                  &lt;label  for="career_star&lt;?php echo $col; ?&gt;2" title=""&gt;&lt;/label&gt;
                  &lt;input type="radio" class="career_ratings" id="career_star&lt;?php echo $col; ?&gt;3" name="career_rating_answer[&lt;?php echo $col; ?&gt;]" value="3"/&gt;
                  &lt;label  for="career_star&lt;?php echo $col; ?&gt;3" title=""&gt;&lt;/label&gt;
                  &lt;input type="radio" class="career_ratings" id="career_star&lt;?php echo $col; ?&gt;4" name="career_rating_answer[&lt;?php echo $col; ?&gt;]" value="4"/&gt;
                  &lt;label  for="career_star&lt;?php echo $col; ?&gt;4" title=""&gt;&lt;/label&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;?php
              $col++;
              }
              }
              ?&gt;
            &lt;div class="col-sm-12"&gt;
              &lt;input type="button" name="save" id="save" value="Save Career Profile" class="btn btn-lg btn-primary nextbuttnn" onclick="saveCareer()"/&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="modal-footer"&gt;
          &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>