ColVis (any version) & jQuery 1.6+ bug and fix
ColVis (any version) & jQuery 1.6+ bug and fix
jimhap
Posts: 4Questions: 0Answers: 0
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.
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.
This discussion has been closed.
Replies
Regards,
Allan