问题标签 [fixheadertable]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
723 浏览

javascript - 尝试按列排序时,将行动态加载到表中不起作用

我在准备好文档期间调用 fixheadertable jquery。之后,我们将根据一些搜索结果向表中添加动态行 (id=test)。代码:

当我们输入搜索条件时,将执行以下代码。这会将结果添加到表中。

现在,如果我们单击列标题,数据就会消失。我们需要它来对表格内容进行排序。我已经尝试使用表的一些静态数据,并且效果很好。但是当我们在页面加载完成后添加行时它不起作用。

看起来一旦加载页面,就不会调用另一个 jquery 中对 fixheadertable 函数的调用。任何想法?请帮忙。

0 投票
1 回答
748 浏览

datatables - jQuery datatables Fix Header Not Adjusting

I have a table that´s using Fix Header without initializing it as a DataTable because I need to use rowspan on the body. The fix header initialize ok but whenever another jQuery event like collapse on the page occurs, the fix header looses its position and won't came back unless I scroll the page with the mouse.

I tried to use the fixHeader.fnUpdate(); but it didn't work for me.

Any ideas?

I leave you the link to the live example.

http://jsfiddle.net/varini_matias/Qd5ju/9/

http://jsfiddle.net/varini_matias/Qd5ju/7/embedded/result/

(click on the message that says "Click here to see the problem")

0 投票
1 回答
335 浏览

javascript - 是否可以在“fixheadertable”插件中使用 AJAX 数据?

我在一个项目http://www.tablefixedheader.com/上使用这个插件,但我需要在创建表时放置一些动态数据。

建表的Js代码为:

我需要包含一些参数。我尝试了什么:

示例 1(不成功)

示例 2(不成功)

示例 3(不成功)

示例 4(不成功)

没有来自开发人员的答案,也没有在论坛上找到类似的东西。任何人都知道如何进行?