Skip to content

"Check all" Checkbox in thead doesn't work with stickyHeaders #261

@ptepper

Description

@ptepper

Hi,

When you place a checkbox in a TH with stickyHeaders, and then scroll down the page so that the THEAD starts floating, the 'check all checkboxes' functionality stops working. I noticed this similar issue:

#83

And if you look in the last demo listed you'll see that this issue occurs there as well: http://jsfiddle.net/Mottie/abkNM/16/

I think it's making a copy of the TH when you scroll down and it sticks, so the click event might not be bound to the floating checkbox element in the TH, so I tried fixing it by adding a class to TH checkbox , and then defining the 'check all' click function using jquery ".on" so that it attaches to elements created in the future, like this:

$(document).on("click",".checkAll",function(){  
    if($(this).is(":checked"))
        $(".rowCheckbox").attr("checked","checked");
    else
        $(".rowCheckbox").removeAttr("checked");    
})

But that does not work. Any ideas?

thanks.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions