jQuery - detect when 'replace' function performs action
<p>I use the jQuery replace function to ensure that users can only enter digits and hyphens into the phone number field (its a private web app, and JS has to be enabled to login). </p>

<p>I want to add a css class (highlight red) to the input for x seconds after the replace function is fired so the user sees visually that the input is rejecting there input.</p>

<p><strong>How do I add a css class to the input for x seconds after the replace function is activated? (only when a input is actually replaced)</strong></p>

<pre><code>$("#v_phone").bind('keyup blur',function(){ 
    $(this).val( $(this).val().replace(/[^\d-]/g,'') ); }
);
</code></pre>
