开发者

How to get the tbody element of a table using JQuery?

I have a table structure (Table1) with thead and tbody.

My main thead also has a table inside wit开发者_运维百科h its own thead and tbody.

When I use $('#Table1 tbody') it returns all tbody elements whereas I'd only need the tbody of the Table1.

How could this be achieved?

Thanks,


 $('#Table1 > tbody')

> will get direct children.


Alternative:

 $('#Table1').children('tbody') 


simple add table id and get the value example

 $('#dc-table tbody').on('keyup','.qty_approved', function(){
   alert('tested...');   
 });
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜