select last child of element that does not have a certain class

后端 未结 4 1822
谎友^
谎友^ 2021-01-16 19:23

I am try to select the last element of a child that does not have a certain class. I have setup a js fiddle.

4条回答
  •  广开言路
    2021-01-16 19:34

    $("aside.col2 :not(.quotebox)").last().addClass("last-round");
    

    Select all of the ones that don't have the class, THEN get the last one.

提交回复
热议问题