jquery selector unable to find visible last-child

后端 未结 3 1781
误落风尘
误落风尘 2021-01-24 18:37

Here is my HTML:

&
3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-24 19:13

    You can use eq() to select the last element from the visible ones:

    var a = $( "table#dataTable.xLookup thead#PickerTHEAD tr th:visible" ).eq(-1);
    
    console.log(a.html());
    
    
             ...
          
          ...
       
      Option ID My Description QTY Unit Price nj1 nj2

提交回复
热议问题