According to here, jquery\'s remove function should work like so..
$(\'div\').remove(\'selector\');
Which I\'m trying in this example.
You should use the following:
$('p').remove('.unwanted');
Argument in remove works as a filter. So here, you first select all elements and then remove only those which have class unwanted.
remove
unwanted
DEMO: http://jsfiddle.net/qwXSw/1/