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 send SMS functionality


The previous recipe covered making a call directly from your mobile website. Making it easy for the user to send an SMS is also a useful feature. This recipe will show you how to add a button that, when clicked, will open the default SMS client on the user's device.

Getting ready

Create recipe-5.html in the chapter10 folder you created before starting this chapter.

How to do it…

It is easy to allow users to be able to quickly send an SMS message to you via your mobile website. Perform the following simple steps to learn how:

  1. Once more, using the jQuery Mobile template created in the first recipe of this chapter, create a simple mobile website within recipe-5.html using the following code:

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