title: Simulating a click in jQuery/JavaScript on a link
body: <p>I want to simulate a click on any link on a page using JavaScript. If that link has some function binded to its 'onclick' event (by any other JS I don't have any control over), then that function must be called otherwise the link should behave in the normal manner and open a new page. </p>
  
  <p>I am not sure that just checking the value of the 'onclick' handler would suffice. I want to build this so that it works on any link element. </p>
  
  <p>I have no control over what function maybe binded to the onclick event of the link using whichever JS library (not necessarily jQuery) or by simply using JavaScript.</p>
  
  <p>EDIT: With the help of the answers below, it looks like it is possible to check for event handlers attached using jQuery or using the <code>onclick</code> attribute. How do I check for event handlers attached using <code>addEventListener</code> / any other JS library so that it is foolproof?</p>