twitter/bootstrap — Issue #821: Reinitialize modal.js object
Author: Uznick
Created: 2011-12-18 02:35:39+00:00
State: open

Imagine, that I have a form in a modal popup. I submit this form in ajax-way, get some json, and try to fill this modal with new content from server.

I did not find a way to update the existing modal with new data, so I tried

```
modal.modal('toggle') # hide the previous modal
modal = $(json.html).modal(true) # fill with new data
modal.modal('toggle') # show the modal
```

This way I get the data, that should be in the modal popup just appended to the end of the

tag. It's the wrong behavior, I guess. Is this a bug, or is there a correct and twitterish way to do this?