Is there a better way to write this in jQuery?

Posted by user302805 on Stack Overflow See other posts from Stack Overflow or by user302805
Published on 2010-03-26T19:30:59Z Indexed on 2010/03/26 19:33 UTC
Read the original article Hit count: 403

$(".sectionHeader").click(function() {
    var row = $(this).parent();
    while (row.next().length != 0) {
        row = row.next();
        if (row.children().first().is('th')) return;
        row.toggle();
    }
});

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-ui