How to select an element's parent and the parent's siblings

后端 未结 7 1411
花落未央
花落未央 2020-12-08 12:53

I have this code:

$(\"#test\").siblings(\'p\').remove();
$(\"#test\").remove();

How can I chain this code instead of writing it separately?

7条回答
提交回复
热议问题