How to identify tags: links added by mobile safari?

We use jQuery to add a click handler to the links that appear on our site to track the event in Google analytics. We see that some events come from links that we did not add there, and since they all received HREFs on lines 1-234-567-890, I assume that the skype plugin has put them there , which I found out added by mobile safari.

At the moment, our selector is as follows:

links = $('.linksection a'); 

How do I change it to exclude tel: links?

+4
source share
1 answer

Assuming the plugin adds links starting with tel: // you can use this code, which filters out all the links that start with tel:

 $('a:not([href^="tel"])') 

Example - http://jsfiddle.net/U2fR8/

+4
source

Source: https://habr.com/ru/post/1340940/


All Articles