O'Reilly logo

PhoneGap Mobile Application Development Cookbook by Matt Gifford

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

Learning the basics of the XUI library

When creating applications that focus as heavily on user interactions as mobile apps do, we want to be able to easily update and manage the underlying HTML and data collections.

How to do it...

We'll make use of XUI's simple but powerful DOM traversal methods and the ability to extend the library functionality into custom code.

  1. Create the basic layout for the HTML page.
  2. Create a div element within the page with some text. In this case we're going for the globally recognized "Hello World" sample text. Set the id attribute for this element to content.
  3. Include a new script tag into the head of your document, and reference the XUI library within your project directory.
    <!DOCTYPE HTML> <html> <head> <meta name="viewport" ...

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