I couln't find a simple function to split DOM nodes by some child, so here is.
Split any node by a child maintaining all nested nodes across the split. The child node is not included in the split.
To see how it works and what it can do, have a look at the tests.