title: Clicking anchor should execute javascript not go to new page
body: <p>I have a HTML anchor that when clicked should make a div slide up or down (I call JQuery's <code>.slideToggle();</code> function);</p>
  
  <p><strong>My Problem:</strong> When I click the link, instead of executing code, it goes to a new page, where the url is the javascript code, in my case, "<code>javascript: $('#attachFileContainer').slideToggle();</code>" and the contents of the page(body) is simply "<code>[object Object]</code>".</p>
  
  <p>My Code:</p>
  
  <pre><code>&lt;a class="interactiveLink" 
       href="javascript: $('#attachFileContainer').slideToggle();"&gt;Attach File&lt;/a&gt;
  </code></pre>
  
  <p>What is going wrong, I have had many anchor elements where I call javascript from the href attribute and this have never happened?</p>