When does jQuery click function need an 'event'?
<p>I had a click function with jquery which didnt work until I added the 'event' (see below). </p>

<p>When is the event needed? This documentation doenst use it: <a href="http://api.jquery.com/click/" rel="nofollow">http://api.jquery.com/click/</a></p>

<p>Didnt work:</p>

<pre><code>$(document).ready(function () {
        $('#div a').click(function () {
            event.preventDefault();
            $('#menu,#wrapper').toggleClass('open');
        });
    })
</code></pre>

<p>Works:</p>

<pre><code>$(document).ready(function () {
        $('#div a').click(function (event) {
            event.preventDefault();
            $('#menu,#wrapper').toggleClass('open');
        });
    })
</code></pre>
