Toolbar buttons stopped working when switching jquery tabs

Toolbar buttons stopped working when switching jquery tabs

orehovoorehovo Posts: 2Questions: 1Answers: 0

Main page with jquery tabs, where all scripts and css are loaded.
When clicking on tab, the page with appropriate datatable is loading.
'Datatables' pages contain some custom buttons (<button id='test1'>test1</button>), plus some html5 buttons in the $("div.toolbar").
The problem is:
Everything work fine until tab is switched, e.g. from tab 1 to tab 2. When switching back to tab 1, buttons in toolbar does not fire on click .
Could it be some conflict between "toolbar" elements on the same page (jquery tabs load content dynamically in the main page)?

Answers

  • orehovoorehovo Posts: 2Questions: 1Answers: 0

    BTW when using html5 buttons only (export pdf, export Excel), everything work just fine. So should I avoid using <button> and <select> in the datatable toolbar?

  • glendersonglenderson Posts: 231Questions: 11Answers: 29

    It sounds like you have a division containing your tabs, then another division (element) containing the datatable. Clicking a tab is firing off an event. My guess is that you are completely reloading the table without destroying it. So, things are starting to get disconnected between the actual rendered HTML and the dataTable memory.

This discussion has been closed.