- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在 JQuery 对话框中使用 Tablesorter 过滤器。当我第一次打开对话框时,Tablesorter 过滤器加载并正常工作。该对话框包含一个下拉列表,当我从此下拉列表中选择值时,对话框会重新加载并显示数据,但 Tablesorter 过滤器不会出现/可见。
谁能帮我解决这个问题。
谢谢
var $dialogproperties = $('#dialogs');
$(document).on('change', '#ddl_Com', function (e) {
e.preventDefault();
var url = getURL;
var data1 = getValues();
url = '@Url.Action("Com_submit")?ID=' + id;
$.post(url, data1, function (data) {
//// Open popup dialog box
var tmp = data.commentdisplay.replace(/\n/g, '<br />');
$dialogproperties.html('');
$dialogproperties.dialog({ title: $('#title').text() });
$dialogproperties.html(tmp);
$dialogproperties.dialog('open');
});
return false;
});
$(function () {
//// - Dialog box width and height
var wWidth = $(window).width();
var dWidth = wWidth * 0.9;
var wHeight = $(window).height();
var dHeight = wHeight * 0.9;
var dialog = "";
dialog = $("#dialogs").dialog({
autoOpen: false,
modal: true,
width: dWidth,
height: dHeight,
fluid: true,
open: function (event, ui) {
stopscroll();
alert('t');
var $table = $('#tblCom');
$table.tablesorter({
textExtraction: {
'.img': function (node) {
var $node = $(node);
return $node.find('span[title]').attr('title');
}
},
imgAttr: 'title',
ignoreCase: false,
widthFixed: true,
widgets: ["filter", "columnSelector"],
widgetOptions: {
filter_useParsedData: true,
filter_columnFilters: true,
filter_ignoreCase: true,
filter_defaultAttrib: 'data-value',
columnSelector_mediaquery: false
}
});
},
close: function (event, ui) {
}
});
});
最佳答案
在初始化表排序器之前确保 HTML 已在对话框内呈现的代码
dialog = $("#dialogs").dialog({
// ...
open: function (event, ui) {
stopscroll();
setTimeout(function() {
var $table = $('#tblCom');
$table.tablesorter({
// ...
});
}, 0);
},
// ...
});
关于jquery - Tablesorter 过滤器在更改事件时未显示在 JQuery 对话框中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46012470/
tablesorter 中的奇怪行为: $(document).ready(function() { var timeInSec = function(node) { return $(nod
我在使用第一列(共 4 列)中的链接的表上使用 Tablesorter。问题是,在 FF 和 Chrome 中,当通过 url 而不是链接的内容点击时,它对第一列进行排序。例如 zzz112233 a
我正在使用 tablesorter 在我的一个页面上对网格进行排序。我每 10 秒进行一次 AJAX 调用以获取更新的股票信息,并相应地更新我的网格。这么多工作,但我无法让我的排序选项正确缓存。相反,
使用 tablesorter 的分页器插件可以进行服务器端分页吗?看起来默认选项要求您一次将所有行加载到浏览器的内存中。由于我有这么多记录,这实际上是不可能的,我更愿意一次加载一页。 tablesor
在使用 tablesorter css 默认主题时,如果我避免设置表格宽度,我会得到一个很好的表格,所有列都完美地调整为最长的字段。 但是,如果我添加过滤器小部件,所有列看起来都比以前宽得多,并且有很
有没有办法通过表排序器 jquery 语法添加数据占位符值,而不是添加到 th HTML 标记本身?也许使用像 filter: false 这样的 header 语法? 最佳答案 有五种方法可以禁用列
我正在尝试在表格上添加一些下拉过滤器以及分页。我正在使用 tableSorter 插件,即,tablesorter 进行排序,tablesorter-filter 或过滤器小部件进行过滤,并使用 ta
我正在使用https://github.com/jbritten/jquery-tablesorter-filter 、jquery 表排序器插件和 jquery 表排序器分页。 当我在文档加载中加载
我想给每一行编号,而不是让这些数字移动/排序。第一列 # 需要是静态的/固定的。所有其他列都可以根据需要进行排序。 这可能吗? 这是我的主题:
我正在使用tablesorter和tablesorterFilter插件,就此而言,tablesorterPager插件对我的数据进行排序。我有一个导航菜单,用于将内容组织到文件夹类型布局中,类似于
注意:JS/Jquery noob 警报(是的,我) 以下两个插件之间似乎存在冲突: 表格排序器 (2.9.1) bootstrap-popover.js v2.2.1 这些插件可以单独使用,但放在一
我已将 tablesorter() 实现到我的 gridview 中,并将其放置在无法对某些列进行排序的位置。但是,我无法在排序时显示升序和降序图标,也无法让默认图标不显示在无法排序的列上。我有以下C
我无法找到如何执行以下操作: 我想要一个顶部的计数器,显示行数和总行数,如下所示: 10/100 (不是寻呼机) 我触发什么? 我在 $(document).ready() 上有一个变量像这样:var
这是我的自定义解析器: $.tablesorter.addParser({ id: "customParser", is: function (stringValue) {
我知道有人对此有一些疑问,但我似乎无法解决我的问题。 我正在将 .csv 文件加载到表排序器中,但我的列之一是日期(2009 年 12 月 23 日)。但它们排序为 12 月 2 日、12 月 23
我有一个表格,其中第一个标题列有一个“全选”复选框,还有一些简单的代码,用于在单击标题复选框时选择页面上的所有复选框。 $('#CheckAll').bind('click',function() {
我有一个表格,其中有一列的数字范围约为 -10 到 10,还有一些空列。 我希望表排序器始终将空列放在表的底部。即使我按升序或降序排序。 像这样: -1 0 2 3 或者像这样: 3 2 0 -1
我创建了一个jquery表,时不时需要清除并重新填充,我的清除方法是这样的: //Clear table content before repopulating values $('#table tr
我有一个通过 jQuery 加载命令加载的表。在加载函数的回调中,我启动了表排序器插件。由于某种原因,该表仅按降序排序而不是升序排序。更奇怪的是,如果我按住shift,它会在升序和降序之间正确切换吗?
有没有jQuery用于调整表列大小的插件,可以与 tablesorter 一起使用吗? 最佳答案 看起来像Flexigrid有你想要的一切。 关于jQuery tablesorter + 调整列宽,我
我是一名优秀的程序员,十分优秀!