Hide navigator
Hide source code
Get the parent of each element in the current set of matched elements, optionally filtered by a selector.
<div>
<table id="tblData" border="">
<tr>
<th>Name</th><th>Last name</th><th>Web</th>
</tr>
<tr>
<td>John</td><td>Resig</td><td>http://ejohn.org/</td>
</tr>
<tr>
<td>Paul</td><td>Bakaus</td><td>http://paulbakaus.com/</td>
</tr>
<tr>
<td>Omar</td><td>Yepez</td><td>http://yepsua.com/</td>
</tr>
</table>
<?php
echo
YsJQuery::newInstance()
->onClick()
->in('#tblData td')
->execute(
YsJQuery::css('background', '#ffffff')->in('#tblData tr'),
YsJQuery::parent()->in(YsJQueryConstant::THIS),
YsJQuery::css('background', '#5C9CCC')
);
?>
</div>
| Name | Last name | Web |
| John | Resig | http://ejohn.org/ |
| Paul | Bakaus | http://paulbakaus.com/ |
| Omar | Yepez | http://yepsua.com/ |
Support requests, bug reports, and off-topic comments will be deleted without warning.