【发布时间】:2016-04-30 13:04:30
【问题描述】:
我有一个使用引导数据表创建的表,当我搜索数据时,它在表中工作。
但我在每一行都创建了一个嵌套表。当我单击特定行上的“显示客户”链接时,将显示此嵌套表。
现在,当我从父表中搜索元素时,它只搜索父表元素,我也想搜索子表元素。
如何做到这一点。
表格的HTML代码:
<table class="table table-hover" id="table2">
<thead>
<tr>
<th>ID</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<a href="#" onClick="project_list('<?=$item->bldr_ID;?>',0)">
details
</a>
</td>
</tr>
//Here generate another child table when I click details link (will call "project_list" function using ajax)
// Now want to search element both parent and child elements from parent table search column
</tbody>
</table>
【问题讨论】:
标签: javascript jquery html twitter-bootstrap codeigniter