title: jquery : event : event.preventDefault(); , e is not defined
body: <p>hey i have a jquery function that is triggered on an anchor's onclick event the function is as follows:</p>
  
  <pre><code>function dropDown(subid, e) {
   e.preventDefault();
   var sub = '#' + subid;
   // hide all submenus first
   $('.subnav').css({'display' : 'none'});
   //Show the Current Subnav 
   $(sub).css({'display' : 'block'});
  }
  </code></pre>
  
  <p>this is how i am tring to trigger it :</p>
  
  <pre><code>&lt;a href="#!" onclick="dropDown('sn_cities')" &gt;Cities&lt;/a&gt;
  </code></pre>
  
  <p>However i am getting this error: <code>e is undefined</code></p>
  
  <p>i want to cancel the default onclick event of the anchor link, any help would be appreciated.</p>