title: Call phonenumber on button click on mobile devices
body: <p>I have a responsive django app that shows a phone number on a button click. I'd like to trigger the phone call on mobile devices. How do I detect the device such that the call to phone action only happens on mobile devices, but on desktop it only shows text? I've seen this post <a href="https://stackoverflow.com/questions/1608548/how-to-trigger-a-phone-call-when-clicking-a-link-in-a-web-page-on-mobile-phone">How to trigger a phone call when clicking a link in a web page on mobile phone</a> but it doesn't help much.</p>
  
  <pre><code> &lt;input onclick="change()"  class="btn btn-primary phone" type="button" value="Show Phone Number" id="myButton1" /&gt;
  
        &lt;script type="text/javascript"&gt;
        function change() 
        {
          var elem = document.getElementById("myButton1");
          elem.value = "" + {{contact_no}};
  
        }
        &lt;/script&gt;
  </code></pre>