jQuery.detach() Pattern May Yield Unexpected Results
zikes opened this issue · comments
Currently the pattern for detaching an element from the DOM before manipulating and reinserting it does not account for its position within the parent element. In the example given at https://github.com/shichuan/javascript-patterns/blob/master/jquery-patterns/detach.html if the table were the first child element under the parent it would end up as the last child element once the operation completed.
Thanks for the comment, but this pattern is only a simple demo of the concept. In real life development, developer can take particular factors into consideration.