Query plugin which helps you replace text phone numbers with
It may be useful if you want to add user friendly markup on mobile devices, but want to keep text phone numbers in desktop version.
This plugin don't have library for detecting mobiles devices as a hard dependency. You are free to use your favorite one.
For example mobile-detect.js
Check out demo (open from mobile device or use emulation).
$('p.containing-phones').phoneHighlight();
var md = new MobileDetect(window.navigator.userAgent);
if (md.mobile()) {
$('.phones').phoneHighlight();
}
Lorem ipsum dolor <a href="tel:+73812786644" class="phone">+7 (3812) 78-66-44</a>
Plugin have 3 options which can be passed into its call:
$('.phone').phoneHighlight({
countrycode: '+7',
citycode: '3812',
minLenWithoutCodes: 7
});
<span class="phone" data-countrycode="+1" data-citycode="123">999-44-22</span>
At firts, you have to install dependencies by running npm install and bower install. Now execute npm run test command.
Released 28 November, 2016
Released 12 November, 2016
Released 02 November, 2016