Just one note,
$table,
$tableHeader (+ content <tr/> and <th/>) and
$tableBody are initially injected in the DOM (before the <select/> selection change event), while $tableBody content (<tr/> and <th/> and <td/>) is dynamically generated after the <select> selection change event. In fact,
what I'm trying to obtain is a table structure "indipendent" by its data (in this way, on a limit-case, I could show/hide columns while no data has yet been inserted inside the table).
Now, everything "seems" to work fine, since the table is correctly created and populated. The problem is when I try to hide/show columns: depending on the execution (and application flow moment) of the
.table() and
.table('refresh') methods. More precisely:
- if I just run the table widget ($table.table(), after injecting rows), without refreshing it, when I try to hide/show columns, only headers are shown/hidden, while corresponding rows data are not (this seems to be a known issue, see here, but that should have been solved in 1.3.1...)
- if I run the table widget and refresh it ($table.table() + $table.table('refresh'), after injecting rows), when I try to hide/show columns, if I hide column X, column X -2 is hidden instead (that is to say that it hides a different column than the selected one), maybe for table-priority issues ?
Is there anybody who experienced these same issues ? Do you have any advice ?
Final note:Actually, on the jQm columntoggle table (official) API reference, it seems to be :
- $(".selector" ).table-columntoggle("refresh");