I have this code:
$(\"#test\").siblings(\'p\').remove(); $(\"#test\").remove();
How can I chain this code instead of writing it separately?
Try this :
$("#test").siblings('p').addBack().remove();