我想调用一个表头上的jquery点击函数来将它与可排序的插件进行排序。Javascript代码不在Chrome中工作,但在其他地方工作
jQuery("#orderby").click();
该代码通常被安排文件准备好,否则它不会工作,工作后的几毫秒。我在Firefox上检查它,并且都很好。然后Chrome并没有什么,Safari也没有得到它。我检查了IE和Opera,它确实很好。
我在Chrome浏览器中通过控制台尝试过它,但它也不起作用。任何想法我可能会失踪?如果你需要额外的细节,请询问。
<table title="Clasificaciones" summary="" class="leaguemanager standingstable sortable">
<thead>
<tr>
<th class="logo num"> </th>
<th>Equipo</th>
<th id="orderby">GC</th>
<th>Loc</th>
<th>Vis</th>
</tr>
</thead>
<tbody>
<tr class="alternate ascend">
<td class="logo"><img title="Logo" alt="Logo" src="#"></td>
<td><a href="#">Cruz Azul</a></td>
<td class="num">7</td>
<td class="num">4</td>
<td class="num">3</td>
</tr>
</tbody>
<tfoot>
</tfoot>
</table>
上面的JS就是所谓的。
如果没有任何JS错误,那么我们可能已经看到了HTML和JS。更多上下文。 – sdleihssirhc
需要查看更多才能进行调查。目标标记是什么样子的,您可以为事件触发器提供更大的代码上下文吗? – kinakuta
是的,我刚刚添加了目标HTML。 – Unckmania