<a href="#">www.w3tr.com</a>
$("a").click(function(event){
  event.preventDefault();
  alert( event.isDefaultPrevented());
});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js