* Example 3 - Adding Objects * @package jqmPhp * @filesource */ /** * Include the jqmPhp class. */ include '../lib/jqmPhp.php'; /** * Create a new jqmPhp object. */ $j = new jqmPhp(); /** * Config 'html' and 'head' tag. */ $j->html()->doctype('html'); $j->head()->title('Example 3'); $j->head()->css('http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css'); $j->head()->jq('http://code.jquery.com/jquery-1.4.4.min.js'); $j->head()->jqm('http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js'); $j->head()->add(new jqmLink('css/custom.css')); // Adding a custom CSS. $j->head()->add(new jqmScript('js/custom.js')); // Adding a custom JavaScript. //$j->body()->attribute('onload', 'initCustom();'); // Adding a custom attribute to 'body' tag. /** * Create and config a jqmPage object. * Most methods return the object itself allowing call * another method on the object in sequence. */ $p = new jqmPage('example-3');