jquery selector unable to find visible last-child

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

Here is my HTML:

&
3条回答
  •  执笔经年
    2021-01-24 19:14

    You are using :last-child Selector which selects all elements that are the last child of their parent.

    You will need to use :last Selector that selects the last matched element.

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

提交回复
热议问题