[英]JQuery Table Sort issue - Skipping column disables first mouse click
I have created a basic table in js fiddle. 我用js小提琴创建了一个基本表。 I am using the datatable sorter function, however if you click along the headers, or click a header, skip one and click another, it seems to ignore the first mouse-click.
我正在使用数据表分类器功能,但是如果您单击标题,或单击标题,跳过一个并单击另一个,它似乎忽略第一次鼠标单击。 (To replicate the issue click on Confirmation Period, then ABN, then back to Confirmation Period)
(要复制问题,请单击确认期,然后单击ABN,然后返回到确认期)
Any thoughts? 有什么想法吗?
<table id="tableSort" class="tableSort" cellspacing="0" style="margin-top:20px;margin-left:10px;">
<thead>
<tr>
<th>Confirmation Period</th>
<th>Legal/Entity Name</th>
<th>ABN</th>
<th>Business/Trading Name</th>
<th>Status</th>
</tr>
</thead>
<tr>
<td>1</td>
<td>a</td>
<td>34</td>
<td>78</td>
<td>b</td>
</tr>
<tr>
<td>2</td>
<td>c</td>
<td>100</td>
<td>90</td>
<td>g</td>
</tr>
and the JS... 和JS ......
$(document).ready(function () {
$('#tableSort').dataTable({
"searching": false,
"paging": false,
"info": false
});
}); });
jsfiddle: http://jsfiddle.net/wcdg3ddL/ jsfiddle: http : //jsfiddle.net/wcdg3ddL/
The table is actually sorting as expected. 该表实际上按预期排序。 There are two reasons why it looks like the columns aren't sorting:
看起来列没有排序的原因有两个:
Here is a fiddle where I have added sufficient rows so that the columns appear to be sorting correctly. 这是一个小提琴 ,我添加了足够的行,以便列看起来正确排序。
I just added more rows to your fiddle: 我刚给你的小提琴添加了更多行:
<tr>
<td>1</td>
<td>a</td>
<td>34</td>
<td>78</td>
<td>b</td>
</tr>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.