Adding preventDefault to click handler