title: Set mask in modal form
body: <p>I'm trying to add masks with masked input plugin in a modal form but I'm struggling to do it. I do not know exactly why it's not working, Could someone help me telling me what's wrong with the code?</p>
  
  <pre><code>&lt;script src="js/jquery.maskedinput.js" type="text/javascript"&gt;&lt;/script&gt;
  
  
  &lt;!-- Modal --&gt;
  &lt;div class="modal fade" id="cadastromodal" tabindex="-1" role="dialog"
  aria-labelledby="myModalLabel" aria-hidden="true"&gt;
  &lt;div class="modal-dialog"&gt;
      &lt;div class="modal-content"&gt;
          &lt;!-- Modal Header --&gt;
          &lt;div class="modal-header"&gt;
              &lt;button type="button" class="close"
              data-dismiss="modal"&gt;
              &lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;
              &lt;span class="sr-only"&gt;Close&lt;/span&gt;
          &lt;/button&gt;
          &lt;h4 class="modal-title" id="myModalLabel"&gt;
              Cadastrar novo contato
          &lt;/h4&gt;
      &lt;/div&gt;
  
      &lt;!-- Modal Body --&gt;
      &lt;div class="modal-body"&gt;
  
          &lt;form class="form-horizontal" role="form" method="POST" action="cadastrocontato.php"&gt;
              &lt;div class="form-group"&gt;
                  &lt;label  class="col-sm-2 control-label"
                  for="inputEmail3" id="nome"&gt;Nome&lt;/label&gt;
                  &lt;div class="col-sm-10"&gt;
                      &lt;input type="nome" name="nome" class="form-control"
                      id="nome" placeholder="Nome"/&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="form-group"&gt;
                  &lt;label  class="col-sm-2 control-label"
                  for="inputEmail3"&gt;Email&lt;/label&gt;
                  &lt;div class="col-sm-10"&gt;
                      &lt;input type="email" name="email" class="form-control"
                      id="email" placeholder="Email"/&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="form-group"&gt;
                  &lt;label  class="col-sm-2 control-label"
                  for="inputEmail3" id="telefone"&gt;Telefone&lt;/label&gt;
                  &lt;div class="col-sm-5"&gt;
                      &lt;input type="telefone" name="telefone" maxlength="10" class="form-control"
                      id="telefone" placeholder="Telefone"/&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="form-group"&gt;
                  &lt;label  class="col-sm-2 control-label"
                  for="inputEmail3"&gt;Celular&lt;/label&gt;
                  &lt;div class="col-sm-5"&gt;
                      &lt;input type="celular" name="celular"  maxlength="10" class="form-control"
                      id="celular" placeholder="Celular"/&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;!-- Modal Footer --&gt;
          &lt;div class="modal-footer"&gt;
              &lt;button type="button" class="btn btn-default"
              data-dismiss="modal"&gt;
              Cancelar
          &lt;/button&gt;
          &lt;button type="submit" class="btn btn-primary"   data-toggle="modal"&gt;
              Cadastrar
          &lt;/button&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>
  </p>
  
  <p>Script:</p>
  
  <pre><code>&lt;script&gt;
   jQuery(function($){
          $("#Telefone").mask("(99) 9999-9999");
   });
   &lt;/script&gt;
  </code></pre>