markguinn/silverstripe-ajax — pull request #3 by cjsewell (2014-10-29 22:04:37+00:00)
Title: Use .empty().append() instead of .html()

Using .html() to update the contents caused issues with child elements that had events attached to them.
Also, I had a few issues with $region.html(), first request worked fine, but subsequent requests $region.html() would only return a portion of the html received.
This is probably because I'm attaching tinymce to elements received from ajax.

Using .empty() removes all event handlers and data on child elements before removing them.
Using .append(), $region does not have to be converted to text again.

While this has fixed my issue, and functions alright. I do not know if it may cause side affects.