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

Building a dynamic mobile website


In the previous recipe, we created a basic website that would allow you to provide content to a user and update it manually relatively easy. In most situations, this would not be enough. Most websites today rely on some form of database to provide them with rich, new content on a regular basis, and it should be no different with mobile websites. This recipe will show you how to use PHP with jQuery Mobile to create dynamic pages with content served from a web server.

Getting ready

You are going to need to create the following directory structure in the web root of your web server. In the following figure, www is the web root; this may be different for you:

In the web root of your web server (www), create an includes folder and the files index.html and categories.php. Within the includes folder, create a subfolder named jquery-mobile and ensure all the jQuery Mobile library files have been copied into it. Also, within the includes folder, create script.js and...