jQuery select only tr/td in main table, not nested tables.

前端 未结 4 1857
感情败类
感情败类 2021-02-07 08:23

I currently have a table with a nested table in it:

   

        
      
      
      
4条回答
  •  天命终不由人
    2021-02-07 09:19

    Use the child selector > to only select those tr elements that are a child of the report table’s tbody, for example:

    $("#report > tbody > tr.odd")
    

提交回复
热议问题