e.preventDefault prevent click
<p>I have the following code to just test how the e.preventDefault() works.
I would think it would stop the click event from happening.</p>

<pre><code>     $(document).ready(function( )
     {

       $("button").click(function(e)
       {

         e.preventDefault();  

          alert('button clicked');

       });

      });
</code></pre>

<p>I have a button. What is the purpose of e.preventDefault().
From what I read, it will prevent the action which in this case is the click.</p>

<p>Note that in the above example, the alert message still show. How does e.preventDefault() work for a button click. I know if it was a hyperlink, it would prevent the hyperlink from going to it target.</p>
