jQuery return onClick
<p>I want to know if is it possible to do the same javascript code with Jquery:</p>

<pre><code>&lt;input type="button" value="Save" onclick="javascript:return CheckPasswords()" /&gt;
</code></pre>

<p>What it does is return true or false on user click.</p>

<p>With Jquery I would write:</p>

<pre><code>$(function()
{
    $("#btnSalvar").click(function(){
       if([...])
       {
         return false;
       }
         return true;
       });
}
</code></pre>

<p>But i dont know in case return false it would have the same effect.</p>

<p>*<em>UPDATED:</em>*Solution is </p>

<pre><code>$("btnSalvar").click(function(e){

    if([...])
    {
    e.preventDefault();
    }
    });
</code></pre>

<p>thk you all!</p>
