How to trigger onClick before href
javascript, jquery, php
Solution
As I understood, you don't want to go on other page, so use return false, like this:
<a href="" onclick="javascript:triggerMe();return false;">click</a>
Problem
I am trying to do some functionality in `onClick()` event and also doing the `href` for the same element. But actually happening is its not triggering `onClick()` completely and its moving to `href` link when we click that element. How to make `onClick()` gets complete first and trigger `href` next. ``` <a href="" onclick="javascript:triggerMe()">click</a> ```