ColVis (any version) & jQuery 1.6+ bug and fix

ColVis (any version) & jQuery 1.6+ bug and fix

jimhapjimhap Posts: 4Questions: 0Answers: 0
edited June 2011 in Bug reports
Was unable uncheck ColVis column option inputs with FF 5.0. & jQuery 1.6.

From the jQuery 1.6 release notes, the attr() function has altered a bit. Recommended way of determining checked state is with $('input').is(':checked')

http://blog.jquery.com/2011/05/03/jquery-16-released/

replacing ColVis.js lines 424-427:

var showHide = $('input', this).attr('checked') === true ? false : true;
if (e.target.nodeName.toLowerCase() == "input") {
showHide = $('input', this).attr('checked');
}

with the following code fixes the problem.

var showHide = !$('input', this).is(":checked");
if (e.target.nodeName.toLowerCase() == "input") {
showHide = $('input', this).is(":checked");
}

Hope this helps.

Replies

  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin
    Awesome - thank you for that! I've just committed in your change and it will be included in the next ColVis release which I'll be putting out later on today.

    Regards,
    Allan
This discussion has been closed.