Run jQuery function after another function
<p>The thing is, I am jquery.maskedinput plugin, which adds to the mask fields</p>

<p>works fine ...</p>

<p>but in a system that I am doing has a function to add extra fields, there the person clicks on a button that makes this feature and it adds more data fields, except that the error appears there, the date fields not added after the mask work, I tried to make the call after add the field but still did not work</p>

<p>I will demonstrate</p>

<p>I have the following fields in a form</p>

<pre><code>&lt;p class="data"&gt;
&lt;input type="text" name="dataInicial" rel="data"&gt;
</code></pre>

<p>and I put the script</p>

<pre><code>$ ('[rel=date]').mask("99/99/9999");
</code></pre>

<p>Works like a charm,</p>

<p>then I have another function that is called by the click of a button</p>

<p>that copies the html text field that I put above and add in a div</p>

<pre><code>var field = $('p.data').html();

$('div.teste').append(field);
</code></pre>

<p>or on page two will look the same, and there lies the error, the mascara mask function only works on the page before it was not us that have been added ..</p>
