jQuery4PHP Current Release: v1.7.0 - Stable

jQuery version: v1.8.2

jQueryUI version: Stable (1.8.24: jQuery 1.3.2+)

jQuery4php API

Traversing

Hide navigator Hide source code

Closest

Get the first element that matches the selector, beginning at the current element and progressing up through the DOM tree.
<div>
  <div>
    <span id="divChildren" style="color:#ffffff;background-color:blue">
      I'm the children
    </span>
  </div>
  <input type="button" id="btnRunClosest" value="Run" />
<?php
echo
YsJQuery::newInstance()
  ->onClick()
  ->in('#btnRunClosest')
  ->execute(
    YsJQuery::closest('div')->in('#divChildren'),
    YsJQuery::css(array('background-color' =>'red','padding' => '5px'))
  )
?>
</div>

I'm the children

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