Book Image

jQuery 2.0 Development Cookbook

By : Leon Revill
Book Image

jQuery 2.0 Development Cookbook

By: Leon Revill

Overview of this book

Table of Contents (17 chapters)
jQuery 2.0 Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Implementing the quick call functionality


HTML5 allows developers to tell the browser to launch an application to make a phone call in the same way you would do for an e-mail. This recipe will show you how to do this with a jQuery Mobile button so that when users click on this button, their default call application will open with a prepopulated telephone number.

Getting ready

Within the chapter10 folder, create recipe-4.html for use within this recipe.

How to do it…

To allow users to be able to click on a button to make a phone call without having to copy and paste a number into their call application, perform the following simple steps:

  1. Re-using the mobile website template, add the following HTML code into recipe-4.html:

    <!DOCTYPE html>
    <html>
    <head>
        <title>Chapter 10 :: jQuery Mobile Template</title>
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <link rel="stylesheet" href="jquery-mobile/jquery.mobile.min.css" />...