Learning the basics of the 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 to custom code:
Create the basic layout for the HTML page.
Create a
div
element within the page with some text. In this case, we're going to create a Hello World sample text. Set theid
attribute for this element tocontent
.Include a new
script
tag in thehead
tag of your document, and reference the XUI library within your project directory:<!DOCTYPE HTML> <html> <head> <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width;" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <title>XUI</title> <script type...