Need some more help with jQuery and textbox character count
<p>I have the following code to count and trigger some functions using jQuery:</p>

<pre><code>        jQuery('#input_guideName').keyup(function(e)
        {               
            if(this.value.length == 5)
            {
                jQuery("#guide_btnCreateGuide").css({'background-position':'top', 'cursor':'pointer'});
                jQuery("#guide_btnCreateGuide").bind('click', function() {
                    createNewGuide(); 
                });
            }
            else if(this.value.length &lt; 5)
            {
                jQuery("#guide_btnCreateGuide").css({'background-position':'bottom', 'cursor':'default'});
                jQuery("#guide_btnCreateGuide").unbind('click');
            }
        });   
</code></pre>

<p>Here are some issues I have encountered:</p>

<ol>
<li><p>Using CTRL + V is counted as 2 keyup, and the code will run twice, executing the <code>createNewGuide()</code> twice. How can I avoid this?</p></li>
<li><p>Pasting code using right mouse button is not detected. How can I detect this? Bu putting a listener on RightMouseButton?</p></li>
<li><p>If I paste text > 5 characters, none of my functions are triggered. I cannot add a control on <code>if(this.value.length &gt; 5)</code>, because then <code>createNewGuide();</code> will fire for each keyup.</p></li>
</ol>

<p>Any ideas how I can overcome these issues?</p>

<p><strong>EDIT</strong><br>
My "operational objective" is to create a new guide in DB and the guide name must be at least 5 characters long. The button for the 'create guide' will not be clickable unless name is at least 5 characters long.</p>
