Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Jquery Get last row of table within last element in a series
- <div id="slides">
- <section id="first">
- <section>
- <table>
- <thead>
- </thead>
- <tbody>
- <tr id="somethingUnique">
- ...
- </tr>
- </tbody>
- </table>
- </section>
- <section>
- <table>
- <thead>
- </thead>
- <tbody>
- <tr id="somethingUnique">
- ...
- </tr>
- </tbody>
- </table>
- </section>
- ...
- </section>
- </div>
- var lastListItem = $('#first:last-child table>tbody>tr:last').attr("id");
- alert(lastListItem);
- $('#first table:last tr:last')
- $('#first tr:last')
- var lastListItem = $('#first section:last table tr:last').attr("id");
- var lastListItem = $("#first").find("section").last().find("tr").last().attr("id");
- $("#first").find("tr:last").attr("id")
- $("#first tr:last").attr("id")
- $('#first section:last-child table>tbody>tr:last').attr("id");
- $('#first section:last-child tr:last-child').attr("id");
Add Comment
Please, Sign In to add comment