O'Reilly logo

WordPress Mobile Applications with PhoneGap by Yuxian Eugene Liang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A simple web app to read data

In this section we will write a simple, one-page JavaScript application to manipulate data. This application has two basic operations: reading and creating posts. This application will form the basis for the remainder of this book.

Reading a blog post

We'll start by performing a simple action: reading a blog post.

Creating a Hello World JavaScript app

We will start by first learning how to display the "Hello World" blog post into our simple JavaScript application. We will be using jQuery extensively to do the heavy lifting of Ajax operations.

  1. First copy the following code into the app.html file:
    <!DOCTYPE HTML> <html> <header> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <script> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required