Unable to Click a row and call javascript function?

Posted by user2807977 on Stack Overflow See other posts from Stack Overflow or by user2807977
Published on 2014-05-30T15:20:58Z Indexed on 2014/05/30 15:25 UTC
Read the original article Hit count: 181

Filed under:
|

I'm unable to trigger $(this).toggleClass('selected'); for content table. When I debug it just skip this event. How can I make sure its being selected?

$('#contentChangesTable tr')
    .filter(':has(:checkbox:checked)')
    .addClass('selected')
    .end()
    .click(function (event) {
        $(this).toggleClass('selected');
        if (event.target.type !== 'checkbox') {
            $(':checkbox', this).attr('checked', function () {
                return !this.checked;
            });
        }
    });

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery