title: Autocomplete not getting applied
body: <p>I have a JQuery tokeninput auto-complete code which is placed inside the <code>document.ready</code> function. The tokeninput is applied to the text box. This code works fine for the text box placed inside the body tags.</p>
  
  <p>I have a template, Inside the template I have a popup which contains a text box. When I applied the same JQuery token-input code to this text box inside the popup. It doesn't work for that.. Does the popup have their own events as like the document ready function or something similar like that?</p>
  
  <p>So where can I put my JQuery tokeninput auto-complete code inside popup or template?</p>
  
  <p>So this is my autoComplete code:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function() {
  alert('Readyyyyyyyy');
      $("#demo-input-facebook-theme").tokenInput(        
            [{
              "first_name": "abc",
              "last_name": "ABC",
              "email": "abc@gmail.com",
              "url": "Image url"
          },
  
              {
              "first_name": "pqr",
              "last_name": "PQR",
              "email": "pqr@gmail.com",
              "url": "Image url"
          },
          {
              "first_name": "lmn",
              "last_name": "LMN",
              "email": "lmn@yahoo.com",
              "url": "Image url"
          }];
  
  
      );
  
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>My popup template code:</p>
  
  <pre><code>&lt;div id="popupMessage" style="display:none;"&gt;
          &lt;div class="PopupHeader"&gt;Send a Message
           &lt;a href="#" onclick="HideModalPopup('popupMessage'); return false;"&gt;X&lt;/a&gt;         
      &lt;/div&gt;
  
  
  
  
     &lt;div class="popupContainer"&gt;
  
          &lt;div class="addnames"&gt;
          &lt;strong&gt;To:&lt;/strong&gt; Daniel Lewis, Michael Jackson, Sarah Day O'connor, Mitt Romney, Clint
          Eastwood, Samuel Jackson &lt;a href class="addMore"&gt;Add More&lt;/a&gt;
          &lt;/div&gt;
          &lt;div class="fields longtextbox"&gt;
              &lt;p&gt;Add from Facebook and Activity Network&lt;/p&gt;
              &lt;!-- &lt;input type="text"/&gt; --&gt;
          &lt;input type="text" id="demo-input-facebook-theme" name="blah2"  /&gt;
  
          &lt;/div&gt;
  
          &lt;div class="fields"&gt;
              &lt;p&gt;Subject &lt;span class="require"&gt;*&lt;/span&gt;&lt;/p&gt;
              &lt;input type="text" /&gt;
          &lt;/div&gt;
          &lt;div class="fields"&gt;
              &lt;p&gt;Message &lt;span class="require"&gt;*&lt;/span&gt;&lt;/p&gt;
              &lt;textarea rows="6"&gt;&lt;/textarea&gt;
          &lt;/div&gt;
  
              &lt;div class="NxtActivity"&gt;
              &lt;a href="#"&gt;Cancel&lt;/a&gt;
                  &lt;button type = "submit" onclick = "my();"&gt;Send Message&lt;/button&gt;
          &lt;/div&gt;
     &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This popup gets called on the click of send message button....</p>