mouseover上的JQuery无法处理数据表
下面是我的HTML代码mouseover上的JQuery无法处理数据表,jquery,datatables,Jquery,Datatables,下面是我的HTML代码 <article class="container content col-xs-12 col-sm-9 col-md-10 col-lg-10"> <div class="x_panel well"> <div class="x_content"> <table id="datatable-buttons" class="table table-striped table-bord
<article class="container content col-xs-12 col-sm-9 col-md-10 col-lg-10">
<div class="x_panel well">
<div class="x_content">
<table id="datatable-buttons" class="table table-striped table-bordered">
<thead>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Start date</th>
<th>Salary</th>
</tr>
</thead>
<tbody></tbody>
<tfoot>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Start date</th>
<th>Salary</th>
</tr>
</tfoot>
</table>
</div>
</div>
</article>
我想做的是,当鼠标在tr数据上但不工作时,我想显示编辑或删除选项。可能有什么问题
这是JQUERY代码:
$("#datatable-buttons tbody tr").mouseover(function()
{
alert("hi");
});
$(“#数据表按钮tbody tr”)
是否已填充?您是在填充表之后添加侦听器的吗?我使用JSON填充它,我没有从HTML端填充数据
$("#datatable-buttons tbody tr").mouseover(function()
{
alert("hi");
});