Opposite of append in jquery

后端 未结 6 1100
难免孤独
难免孤独 2021-01-31 07:05

I use .append to add to a div

$(this).append(\'
  • test
\');

how can I search for a

6条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-31 07:19

    You could use remove(). More information on jQuery remove().

    $(this).children("ul").remove();
    

    Note that this will remove all ul elements that are children.

提交回复
热议问题