filamentgroup/Ajax-Include-Pattern — pull request #13 by patocallaghan (2012-10-23 21:57:24+00:00)
Title: ajaxInclude event doesn't fire when doing a data-replace operation

When doing a data-replace operation and attaching an `ajaxInclude` event handler, the event doesn't fire. I guess this is to do with the fact the element has been removed from the DOM.

I've made a fix which isn't that elegant but works. When a data-replace operation is being carried out I swap the order to fire the `ajaxInclude` event first and then replace the element.

I've also added a passing test case to the test suite.