title: Get target URL of clicked event - client side
body: <p>I have to get the target URL when clicking on the menu or any link in the master page.</p>
  
  <p>I have used the following code</p>
  
  <pre><code>var target = $(document.activeElement)[0].href;
  </code></pre>
  
  <p>Which works 90% correctly.Since when I click a link from a menu for the first time.It shows undefined.</p>
  
  <p>That is I have Many Menus in the master page and each menu contains many navigations.When I click a navigation from a menu for the first time, it will not have the value.If I click any of the link from the same menu after that it shows correct target link.</p>
  
  <p>Please help me to find a was to get the target URL.</p>