remove last append element jquery

后端 未结 5 943
慢半拍i
慢半拍i 2020-12-23 17:50

I have the following code:

$(this).children(\"a:eq(0)\").append(\'

        
5条回答
  •  抹茶落季
    2020-12-23 18:13

    try this. Just added .not(':last-child') which excludes the last element in your collection. So you don't have to remove it.

    $(this).children("a:eq(0)").not(':last-child').append(''
    );
    

提交回复
热议问题