jquery/jquery — pull request #752 by kgn (2012-04-25 21:55:29+00:00)
Title: DOMNodeRemovedFromDocument & DOMNodeRemoved don't fire on nodes removed with remove

In this example the functions bound to `DOMNodeRemovedFromDocument` & `DOMNodeRemoved` never go off because [`cleanData`](https://github.com/jquery/jquery/blob/master/speed/jquery-basis.js#L4518)(which strips off all events) is called before `elem.parentNode.removeChild( elem );` in [`remove`](https://github.com/jquery/jquery/blob/master/speed/jquery-basis.js#L4111).
```

```

To fix this issue I've swapped the order in `remove` so that the element is removed from the dom first then `cleanData` is run.

This should fix [this issue](http://forum.jquery.com/topic/problem-with-bindings-and-domnoderemoved-and-domnoderemovedfromdocument-events).