O'Reilly logo

PhoneGap by Andrew Lunny

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

Time for action – Downloading, building, and using XUI

We're going to go back to the food listing application we last touched on back in Chapter 3, and see how we can use XUI to simplify the code and quickly add some extra functionality. Firstly, we need to get our own copy of XUI:

  1. Get your own copy of XUI—the download is available at http://xuijs.com/dwnloads.
  2. Copy the new JavaScript file into your food project directory, and add a script tag to include XUI, just before the first, large script tag:
    <script src="xui.js"></script>
  3. Let's take some of the existing JavaScript code and use XUI's API rather than the native DOM commands to do the same thing. One thing that XUI does, like a lot of JavaScript libraries, is allow terse selection of DOM nodes, ...

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