stop propagation and prevent default when anchor is clicked