jQuery4PHP Current Release: v1.7.0 - Stable

jQuery version: v1.8.2

jQueryUI version: Stable (1.8.24: jQuery 1.3.2+)

jQuery4php API

JqTree

Hide navigator Hide source code

Themes


<?php
//For use the plugin
YsJQuery::usePlugin(YsJQueryConstant::PLUGIN_JQTREE);
?>

<button id="btnOpenDialog">Show Demo</button>

<?php echo YsUIDialog::initWidget('dialogId','style="display:none" title="Basic dialog"') ?>

<div id="myTree" style="height: 100%">
    <ul>
        <li id="phtml_1">
            <a href="#">Root node 1</a>
            <ul>
                <li id="phtml_2">
                    <a href="#">Child node 1</a>
                    <ul>
                        <li id="phtml_21" onclick="alert('You click in : ' + this.id)" >
                            <a href="#">Child node 11</a>
                        </li>
                        <li id="phtml_22">
                            <a href="#">Child node 22</a>
                        </li>
                    </ul>
                </li>
                <li id="phtml_3">
                    <a href="#">Child node 2</a>
                    <ul>
                        <li id="phtml_31">
                            <a href="#">Child node 31</a>
                        </li>
                        <li id="phtml_32">
                            <a href="#">Child node 32</a>
                        </li>
                    </ul>
                </li>
            </ul>
        </li>
        <li id="phtml_4">
            <a href="#">Root node 2</a>
        </li>
    </ul>
</div>

<?php echo YsUIDialog::endWidget() ?>

<?php
echo
YsJQuery::newInstance()
  ->onClick()
  ->in('#btnOpenDialog')
  ->execute(
    YsUIDialog::build('#dialogId')
      ->_modal(true)
      ->_width(670)
      ->_height('auto')
      ->_buttons(array(
        'Ok' => new YsJsFunction('alert("Hello world")'),
        'Close' =>  new YsJsFunction(YsUIDialog::close('this')))
       )
  );

echo
YsJQuery::newInstance()
  ->execute(
    YsJQTree::build()->in('#myTree')
      ->_themes(array(
        'theme' => 'classic',
        'dots' => false,
        'icons' => false))
      ->_themeroller(array(
        'item' => '',
        'item_h' => ''))
      ->_plugins(array(
        "html_data", "ui", "themeroller"))
  );
?>

About

Demos

jQueryUI

Plugins Support - New!

Components - New!

Project Developed by The YepSua Team
SourceForge.net