Search code examples
jquerydatatablesjquery-ui-dialogtabletools

Trouble using DataTables TableTools within a jQuery UI dialog


I'm trying to use the DataTables 'TableTools' plugin on a table within a jQuery UI dialog. They work fine outside the dialog, but inside, the only button that works is Print.

Here's a jsFiddle demo'ing the problem: http://jsfiddle.net/Yd3PT/31/

Any ideas?


Solution

  • Credit to Obbi, but for future references (this thread was easier to find).

    http://datatables.net/forums/discussion/9480/tabletools-export-buttons-do-nothing-in-ie-or-chrome-in-jquery-ui-modal-updated-fixed/p1

    "Turns out I was looking at it all wrong. JQuery UI has a bug where if ran in a modal, it removes the click functions from certain elements due to its default z-index."

    i.e. $("#datatableDiv").dialog({ height: 500, width: 1000, modal: true, zIndex: 1 });