Right way to get the children

Posted by Web Developer on Stack Overflow See other posts from Stack Overflow or by Web Developer
Published on 2012-06-06T10:35:30Z Indexed on 2012/06/06 10:40 UTC
Read the original article Hit count: 266

Filed under:
|

I have the below code and it works but what is the right way to get table onclick of add

HTML

<h4 class="titlebar">
    Skills
    <small><a onclick="return false;" href="/add/" data-span="3">Add</a></small>
</h4>

<div class="body">
    <table class="table"><tbody>
       <tr><td width="125"></td></td></tr>
    </tbody></table>
</div>

JQuery

var TableBlock      = $(this).closest('.titlebar').next().children('table');

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery