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

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