jQuery DataTable宽度问题

时间:2013-06-27 19:16:55

标签: javascript jquery css datatables

我有一个由我使用javascript生成的表这个表有一个过滤器按钮,根据我的过滤器重新加载表,然后,DataTable它:

//here i declare the dataTable and clear it.
Table = $('#pattern-style-a').dataTable();
Table.fnClearTable();

//here is a lot of functions that generates a html table with data contents.
<Javascript code that generates the html table with its data>

//here i transform my table into a dataTable(**the problem**)
$('#pattern-style-a').dataTable({
  "bDestroy": true,
  "sDom": '<"top">rt<"bottom"ip><"clear">',
  "bSort": true,
  "aaSorting": [[ 4, "asc" ]]
});

我的问题是:当我将我的表转换为dataTable时,它可以正常工作,但每次执行时都会从整个表中减少2px。

所以每次我执行这些代码时,我的表减少2px,它会继续无限发生,我真的不知道为什么以及这些-2px的东西。

在清理表并将表重新转换为数据表时,有人知道这种奇怪的宽度会减少吗?

0 个答案:

没有答案
相关问题