Mobile website “WhatsApp” button to send message to a specific number
Click to chat whatsapp in website to redirect web.whatsapp.com with default content or message and in mobile device to open in whatsapp in mobile app with default content to text bar in app.
HTML CODE ADD THIS
<a target="_blank" title="Contact Us On WhatsApp" href="https://web.whatsapp.com/send?phone=+91xxxxxxxxx&text=Hi, I would like to get more information.." class="whatsapplink hidemobile" style="background-color:#2DC100"> <i class="fa fa-fw fa-whatsapp" style="color:#fff"></i> <span style="color:#fff"> Contact Us On WhatsApp </span> </a>
JAVA SCRIPT CODE THAT"S IT <script type="text/javascript"> var mobile = (/iphone|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase())); if (mobile) { $('.hidemobile').css('display', 'none'); // OR you can use $('.hidemobile').hide(); } else { $('.hideweb').css('display', 'none'); // OR you can use $('.hideweb').hide(); } </script>
Click to chat whatsapp in website to redirect web.whatsapp.com with default content or message and in mobile device to open in whatsapp in mobile app with default content to text bar in app.
HTML CODE ADD THIS
<a target="_blank" title="Contact Us On WhatsApp" href="https://web.whatsapp.com/send?phone=+91xxxxxxxxx&text=Hi, I would like to get more information.." class="whatsapplink hidemobile" style="background-color:#2DC100"> <i class="fa fa-fw fa-whatsapp" style="color:#fff"></i> <span style="color:#fff"> Contact Us On WhatsApp </span> </a>
JAVA SCRIPT CODE THAT"S IT <script type="text/javascript"> var mobile = (/iphone|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase())); if (mobile) { $('.hidemobile').css('display', 'none'); // OR you can use $('.hidemobile').hide(); } else { $('.hideweb').css('display', 'none'); // OR you can use $('.hideweb').hide(); } </script>
Post a Comment
0Comments