Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable link to phone number when on Desktop?

Tags:

web

tel

How can I add a phone number to a website that is clickable but hides the link when I'm browsing on a website that doesn't support touch.

I could use Modernizr to set it up although. I don't know how.

<a href="tel:1300723579"><p><img src="assets/images/bt_calltoaction.gif" alt="View Projects" width="306" height="60"></p></a> 
like image 860
jaycodez Avatar asked Mar 15 '13 05:03

jaycodez


People also ask

Should phone numbers be clickable on desktop?

For a Desktop User Which is best? :If there is a functionality (Skype, contact card...etc) then yes. If there is not then not. Once the users clicks the link on desktop it will prompt them with a modal depending on their browser.

How do I remove a link from a phone number?

Manage your Google Account. At the top, tap Personal info. In the "Contact info" section, tap Phone. Remove number.

Can a phone number be a link?

You can make a phone number a clickable link that opens a dial dialog on smartphones and mobile devices. To get started, highlight the number and click the Link button. Next, change the Protocol to <other> and paste the phone number into the URL box, with the prefix "tel:+" as shown below. Click OK when finished.

How do you make a hyperlink call a phone number?

Href=tel: creates the call link. This tells the browser how to use the number. “Tel: 123-456-7890 “creates the HTML phone number. The number within the quotes is the number it will call.


1 Answers

Could you just have the code in twice? i.e...

<div class="desktoptel">0800 000 000</div> <div class="mobiletel"><a href="tel:0800-000-000">0800-000-000</div> 

Then just 'display:none;' on the relevant class depending on your browser sizes?

like image 160
Jamie Cottrell Avatar answered Oct 06 '22 00:10

Jamie Cottrell