Reputation: 1671
Does someone have a working example where multiple remote links have to be loaded into the modal? What I want is a datatable and when one clicks on a link in the row, I want to open the edit page for that row. e.g. edit.php?id=xyz.
My example works only for the first row I want to edit, when I click on a different row, the content of the first row is loaded.
I've been searching and this topic was the closest, however it does not work for bootstrap 3.2.0
Twitter bootstrap remote modal shows same content everytime
Upvotes: 0
Views: 1149
Reputation: 4901
The Bootstrap modal usage says that the remote content will be loaded one time. So, what you have to do is remove the content of the modal when you close it. That will allow new content to be loaded.
$('body').on('hidden.bs.modal', function(e) {
$(e.target).removeData('bs.modal').find('.modal-content').empty();
});
Upvotes: 2