If the target is a link, you can use .is()
Example:
$(".element").on("click", function(e){ if($(e.target).is("a")){
EDIT:
If it is surrounded by another element inside the anchor tag, you can use closest() and check if it has a parent anchor character or not using length
Example:
$(".element").on("click", function(e){ if($(e.target).closest("a").length){
Keepmove
source share