Closed ttk closed 8 years ago
Added unwrapInner, and updated unwrap() to behave the way jquery does.
@ttk, thank you very much for your contribution. Would you please add some unit tests for the changed behavior of wrapAll and unwrap (i.e. test cases that fail on the old behavior but pass with your changes) and the new method unwrapInner.
Unit tests added!
Taking the position of the first node being wrapped is what jQuery does. The old behaviour is to append the wrapped elements to the parent, which is wrong.