Thanks, just tried it on our test/preview site and replacing var url = (e.target.hasAttribute('href')) ? e.target.getAttribute('href') : e.target.closest('[href]').getAttribute('href');
with var url = (e.target.hasAttribute('href')) ? e.target.getAttribute('href') : $(this).closest('[href]').attr('href');
did the trick. Appreciate your help.