ColVis: Checkboxes not working.

ColVis: Checkboxes not working.

EricEric Posts: 24Questions: 0Answers: 0
edited June 2011 in General
I'm using the ColVis plugin, it applies to my tables fine, shows the list of columns just fine, however, when I click on the checkbox to hide a column, nothing happens. When I look at the ColVis code (_fnDomColumnButton) $('input',this).attr('checked') is always true.

Any ideas? I don't know of a conflict that could be causing this.

Replies

  • EricEric Posts: 24Questions: 0Answers: 0
    Also, if ( e.target.nodeName.toLowerCase() == "input" ) is always BUTTON, never 'input'.
  • EricEric Posts: 24Questions: 0Answers: 0
    Allan,

    It appears that the ColVis plugin does not work with JQuery 1.6.1. I downloaded 1.5.2 and everything is working now.

    Thanks,
    Eric
  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    Can you give me a link to your example which does this please? I've been using jQuery 1.6.1 with ColVis without any issues. The problem you note has been raised before, but I've never been able to reproduce it, so I've not been able to fix it yet...!

    Thanks,
    Allan
  • EricEric Posts: 24Questions: 0Answers: 0
    Allan,

    I can't link to the app, sorry. However, I can tell you how to recreate it as I did. I suspected another JS file was in conflict. So, I downloaded the plugin, tested it as is before moving to my app directories, then copied over all of my JS files and started to eliminate one by one.

    Here is the code that does not work. Sorry, I can't remember how to tag code, so I'll just paste in the script includes. This is the only code that I changed. I tried the minified and uncompressed 1.6.1, both don't work for me.





    $(document).ready( function () {
    $('.display').dataTable( {
    "sDom": 'C<"clear">lfrtip'
    } );
    } );


    Eric
  • thiagopradothiagoprado Posts: 1Questions: 0Answers: 0
    I'm having the same problem! All the latest plugins versions.

    Any solution?

    Thanks
  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    Can you link to a test page which shows the problem please? http://datatables.net/release-datatables/extras/ColVis/index.html shows that this should work okay.

    Allan
This discussion has been closed.