javascript - 从表中的 <th> 中删除属性

标签 javascript jquery tapestry

我目前正在使用 Tapestry 。
该表已生成我想要删除的排序按钮。

如何从第元素中删除属性“data-grid-column-sort”

<table class="managementlisttable thead-inverse table-hover">
    <thead>
        <tr class="row hidden-md-down" data-inplace-grid-links="true">
            <th class="col-xs-12 col-lg-3 col-xl-3" data-grid-column="first" data-grid-column-sort="sortable" data-grid-property="name">…</th>
            <th class="alignRight col-xs-12 col-lg-3 col-xl-3" data-grid-column-sort="sortable" data-grid-property="maxAmount">…</th>
            <th class="alignRight col-xs-12 col-lg-3 col-xl-3" data-grid-column-sort="sortable" data-grid-property="warnAmount">…</th>
            <th class="alignRight col-xs-12 col-lg-3 col-xl-3" data-grid-column="last" data-grid-column-sort="sortable" data-grid-property="orderAmount">…</th>
        </tr>
    </thead>
    <tbody>…</tbody>
</table>

最佳答案

我找到了解决问题的方法。
有一种方法可以将列的 sortable 设置为 false。
此链接显示如何禁用排序功能 http://jumpstart.doublenegative.com.au/jumpstart/examples/tables/editablegrid1

关于javascript - 从表中的 <th> 中删除属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48259082/

相关文章:

javascript - 在动态 JQuery 元素上设置动态数据

java - Tapestry : Start page use english locale instead of default locale

javascript - 未定义从附加数组中返回

javascript - JavaScript 中的自引用正则表达式

javascript - jquery 动画滚动不起作用

jquery - Firefox:当未找到图像时,它会破坏 html 层

java - 组装嵌入式组件异常 'exceptiondisplay'

java - 使用 Tapestry 和 Hibernate 的 Web 应用程序在调用 persist() 时抛出异常

javascript - AmChart 股票图表未显示不同的图表

javascript - 如何从闭包中的函数内部访问闭包中的变量?