Replace .remove() with .detach() for after element

[**.remove()**](http://api.jquery.com/remove/) method will remove all bound events and jQuery data associated with the elements. So, for example, if user have onclick callback for config.after element, it will be removed. To remove element from DOM and keep all data, we can use [**.detach()**](http://api.jquery.com/detach/) method.