We use jQuery to add a click handler to links that occur in part of our site, in order to track the event in Google analytics. We're seeing that some events are coming in from links that we haven't put there, and since they've all got HREFs along the lines of 1-234-567-890 I'm guessing the skype plugin has put them there which I've learnt are being added by mobile safari.
At the moment, our selector looks like this:
links = $('.linksection a');
How should I change it to exclude the tel: links?
Assuming the plugin adds the links starting with tel:// you can use this code which filters out all links that start with tel:
$('a:not([href^="tel"])')
Example - http://jsfiddle.net/U2fR8/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With