jQuery preventDefault on input field
<p>I have a simple jQuery function as such:</p>

<pre><code>$(function() {
    $('div.dropdown-menu').click(function() {
        var $this = $(this);
        $this.toggleClass('active');
        $('.menu').toggle();
    });
});
</code></pre>

<p>this works excellent, showing and hiding the dropdown .menu which is currently just a unordered list with list buttons.</p>

<p>However I want to add a login form to the dropdown menu on some page, yet clicking on the input fields in such form will cause the menu to close(hide).</p>

<p>How do I change my code to prevent this behavious</p>
