jQuery4PHP Current Release: v1.7.0 - Stable

jQuery version: v1.8.2

jQueryUI version: Stable (1.8.24: jQuery 1.3.2+)

jQuery4php API

Miscellaneous

Hide navigator Hide source code

ToArray

Retrieve all the DOM elements contained in the jQuery set, as an array.
<div>
<input type="button" value="To Array" id="btnToArray" />
<ul id="lstToArray">
  <li style="padding:0px">Item 1</li>
  <li style="padding:0px">Item 2</li>
  <li style="padding:0px">Item 3</li>
  <li style="padding:0px">Item 4</li>
</ul>
<?php
echo
YsJQuery::newInstance()
  ->onClick()
  ->in('#btnToArray')
  ->execute(
    sprintf('alert(%s)', 
            YsJQuery::toArray()->in('#lstToArray li')
                               ->setAccesors('[0].innerHTML'))
  )
?>
</div>

  • Item 1
  • Item 2
  • Item 3
  • Item 4

Comments

  • Support requests, bug reports, and off-topic comments will be deleted without warning.

blog comments powered by Disqus

About

Demos

jQueryUI

Plugins Support - New!

Components - New!

Project Developed by The YepSua Team
SourceForge.net