Is there a way to complete this script in one line?
$(this).next("br").remove(); $(this).remove();
I tried $(this).remove().next("br").remove();, but this does not work, because we delete the item before we can find the next one.
$(this).remove().next("br").remove();
You can use addBack () (or its predecessor andSelf () before jQuery 1.8):
$(this).next("br").addBack().remove();
Alternatively, you can use end () to return to the previous set of matched elements:
$(this).next("br").remove().end() .remove();
$(this).add( $(this).next("br") ).remove();