jQuery: how do I check if an element is the last sibling? March 24, 2023 by Tarik This is more elegant and worked for me: if($(this).is(':last-child')) { alert('123'); }