Prevent onclick execution with jquery
<p>UPDATED</p>

<p>Html Code:</p>

<pre><code>&lt;input type="textbox" id="textbox" value=""&gt;
&lt;input type="button" id="btn" value="Validate" onclick="document.write('VALIDATION PASSED')" /&gt;​
</code></pre>

<p>JS Code:</p>

<pre><code>$(document).ready(function() {
    $("#btn").click(function() {
        if ($("#textbox").val().length == 0) {
            alert("Validation error");        
            return false;
        }
    }).prop("onclick", null );
})​
</code></pre>

<p>I have updated my code. So the issue is that after first click my onclick event stopped working. How I could fix it?</p>

<p>P.S. Please DO NOT change html code. I have some reasons to ask about it, but please could you please do it only with javascript? I realize that probably this is not the most easy way but I have some technical limitations in my application.</p>

<p>Thanks!</p>

<p>JSFiddle <a href="http://jsfiddle.net/B5GWx/12/" rel="nofollow">http://jsfiddle.net/B5GWx/12/</a></p>
