I have this code:
$(\"#test\").siblings(\'p\').remove(); $(\"#test\").remove();
How can I chain this code instead of writing it separately?
$("#text").siblings('p').remove().prevObject.remove();
edit: Though this works, don't do this. as Matt's comment says, prevObject is undocumented
prevObject