title: Phone mask with jQuery and Masked Input Plugin
body: <p>I have a problem masking a phone input with jQuery and <a href="http://digitalbush.com/projects/masked-input-plugin/" rel="noreferrer">Masked Input Plugin</a>.</p>
  
  <p>There are 2 possible formats:</p>
  
  <ol>
  <li><code>(XX)XXXX-XXXX</code>  </li>
  <li><code>(XX)XXXXX-XXXX</code></li>
  </ol>
  
  <p>Is there any way to mask it accepting both cases?</p>
  
  <p>EDIT:</p>
  
  <p>I tried:</p>
  
  <pre><code>$("#phone").mask("(99) 9999-9999"); 
  $("#telf1").mask("(99) 9999*-9999");    
  $("#telf1").mask("(99) 9999?-9999"); 
  </code></pre>
  
  <p>But it doesn't works as I would like.</p>
  
  <p>The closest one was (xx)xxxx-xxxxx. </p>
  
  <p>I would like to get (xx)xxxx-xxxx when I type the 10th number, and (xx)xxxxx-xxxx when I type the 11th. Is it posible?</p>