KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How do I check if an element is the last sibling? For the last cell in a row I want to perform a different action. This doesn't work: $('td').each(function(){ var $this = $(this); if ( $this === $this.parent().last('td') ) { alert('123'); } }) And neither does it if I remove .parent() .
Tags (comma-separated)
Save Edits
Cancel