jejacks0n/mercury — Issue #99: trigger reinitialize has no effect
Author: grrrisu
Created: 2011-11-19 12:56:51+00:00
State: open

Hi Jeremy

I try to add new editable regions to a page. After the ajax call the new added regions are marked with the blue border, but are not editable.
Only after a reload of the whole page everything works as expected. Am I missing something trivial? Here some of my code:

```javascript
$().ready(function(){

jQuery(top).trigger('initialize:frame');

$("#container_template").live("change", function() {
var form = $(this).parent();
$.ajax({
url: form.attr("action"),
type: form.attr("method"),
data: form.serialize(),
dataType: 'html',
success: function(data, status, xhr) {
form.before(data);
Mercury.trigger('reinitialize');
}
});
return false
})

});
```
Im using the following versions: mercury-rails (0.2.3), jQuery 1.7