<li class="ui-widget-content">Item 4</li>
    <li class="ui-widget-content">Item 5</li>
    <li class="ui-widget-content">Item 6</li>
  </ol>
  <?php 
ui_selectable_support_to('#selectable', array('listener' => array('selector' => '#btnSelectableListener', 'event' => 'click'), 'stop' => like_function('var result = $("#select-result").empty();
                                     $(".ui-selected", this).each(function(event,ui){
                                          var index = $("#selectable li").index(this);
                                          result.append(" #" + (index + 1));
                                          //result.append(" #" + (index + 1));
                                     });')));
?>


  <?php 
echo ui_disable_selection('#selectable li');
?>
</div><!-- End demo -->

<fieldset><legend>Actions buttons for ui.selectable</legend>
  <?php 
echo ui_button_pane_init($type = 'single', array('btnDetroySelectable' => array('value' => 'Destroy selectable'), 'btnBuildSelectable' => array('value' => 'Build selectable'), 'btnDisableSelectable' => array('value' => 'Disable'), 'btnEnableSelectable' => array('value' => 'Enable'), 'btnGetSelectableOption' => array('value' => 'Get option'), 'btnSetSelectableOption' => array('value' => 'Set option')));
?>
  <?php 
echo ui_button_pane_end();
?>
</fieldset>
<?php 
/*
* Add jQuery support to the buttons above
* **click event**
Example #2
0
  <?php 
ui_sortable_support_to('#sortable1, #sortable2', array('listener' => array('selector' => '#btnSortableListener', 'event' => 'click'), 'items' => 'li:not(.ui-state-disabled)'));
?>

  <h3 class="docs">Cancel sorting (but keep as drop targets):</h3>
  <ul id="sortable2">
    <li class="ui-state-default" id="foo_1">Item 1 </li>
    <li class="ui-state-default ui-state-disabled" id="foo_2">(I'm not sortable)</li>
    <li class="ui-state-default ui-state-disabled" id="foo_3">(I'm not sortable)</li>
    <li class="ui-state-default" id="foo_4">Item 4</li>
  </ul>
  
  </div><!-- End demo -->

  <?php 
echo ui_disable_selection('#sortable1 li, #sortable2 li');
?>

<fieldset><legend>Actions buttons for ui.sortable</legend>
    <?php 
echo ui_button_pane_init($type = 'single', array('btnDetroySortable' => array('value' => 'Destroy sortable'), 'btnBuildSortable' => array('value' => 'Build sortable'), 'btnDisableSortable' => array('value' => 'Disable'), 'btnEnableSortable' => array('value' => 'Enable'), 'btnSerializeSortable' => array('value' => 'Serialize'), 'btnToArraySortable' => array('value' => 'To Array'), 'btnCancelSortable' => array('value' => 'Cancel'), 'btnGetSortableOption' => array('value' => 'Get option'), 'btnSetSortableOption' => array('value' => 'Set option')));
?>
  <?php 
echo ui_button_pane_end();
?>
</fieldset>
<?php 
/*
* Add jQuery support to the buttons above
* **click event**
*/