/** * Create and config a new jqmListview object and add Items. */ $list1 = new jqmListview(); $list1->splitIcon('search')->splitTheme('c'); $list1->addDivider('Beginner', '2')->inset(true); $list1->addBasic('Basic Example', 'example-1.php#'); $list1->items()->get(1)->add('<a href="example-1.php.txt" rel="external" target="_blank"></a>'); $list1->addBasic('Adding Pages', 'example-2.php#'); $list1->items()->get(2)->add('<a href="example-2.php.txt" rel="external" target="_blank"></a>'); $list1->addDivider('Intermediate', '3'); $list1->addBasic('Adding Objects', 'example-3.php#'); $list1->items()->get(4)->add('<a href="example-3.php.txt" rel="external" target="_blank"></a>'); $list1->addBasic('Adding Form Elements', 'example-4.php#'); $list1->items()->get(5)->add('<a href="example-4.php.txt" rel="external" target="_blank"></a>'); $list1->addBasic('Adding Listview', 'example-5.php#'); $list1->items()->get(6)->add('<a href="example-5.php.txt" rel="external" target="_blank"></a>'); $list1->addDivider('Advanced', '3'); $list1->add('<li><a href="custom-css.php" rel="external">Custom CSS</a><a href="custom-css.php.txt" rel="external" target="_blank"></a></li>'); $list1->add('<li><a href="custom-js.php" rel="external">Custom JavaScript</a><a href="custom-js.php.txt" rel="external" target="_blank"></a></li>'); $list1->addBasic('Load Simple XML', 'simple-xml.php#'); $list1->items()->get(10)->add('<a href="simple-xml.php.txt" rel="external" target="_blank"></a>'); $p->addContent($list1); /** * Add the page to jqmPhp object. */ $j->addPage($p); /** * Generate the HTML code. */ echo $j;
$p->header()->theme('a'); $bt = $p->header()->addButton('', 'index.php#', 'a', 'home', false, false, true); $bt->rel('external')->attribute('data-iconpos', 'notext'); /** * Adding Content. */ $p->addContent('<h1>Adding Custom JavaScript</h1>'); $p->addContent('<p align="justify">To add a custom JS you need add the tag <b>' . htmlspecialchars('<script...></script>') . '</b>'); $p->addContent(' to the jqmHead object [<b>' . htmlspecialchars('$jqmPhp->head()') . '</b>] in the jqmPhp instance. '); $p->addContent('To facilitate the addition of JS you can use the class <b>jqmScript</b> as example:</p>'); $p->addContent('<pre class="ui-body-c" style="padding:20px;">$jqmPhp = new jqmPhp();' . "\n" . '$jqmPhp->head()->add(' . "\n\t" . 'new jqmScript(\'custom.js\')' . "\n" . ');</pre>'); $p->addContent(new jqmTag('p', 'p_js', 'class="ui-body-c" style="padding:20px;"', ' ')); /** * Adding Source Code Links. */ $list = new jqmListview(); $list->inset(true)->dividerTheme('a'); $list->addDivider('Source Code'); $li = $list->addBasic('custom.js', 'custom.js', '', true); $li->rel('external')->target('_blank'); $li = $list->addBasic('custom-js.php', 'custom-js.php.txt', '', true); $li->rel('external')->target('_blank'); $p->addContent($list); /** * Add the page to jqmPhp object. */ $jqmPhp->addPage($p); /** * Generate the HTML code. */ echo $jqmPhp;