If you're an avid Bootstrap user like myself, you've more than likely used the Modal plugin. You may also have noticed there's a feature in there where you can load content from a remote file. The only problem with it is, is that when you open the modal, the content loads -- which is fine -- but, if you close the Modal, change the content of the external file and then reopen the Modal, the content doesn't refresh.
Well, I've coded a little fix that may help you if you have the same problem as me.
Hope it helps.
Mark
Well, I've coded a little fix that may help you if you have the same problem as me.
Code:
$("[data-toggle='modal']").click(function(e){
e.preventDefault();
$($(this).attr("data-target") + ' .modal-body').load($(this).attr("href"), function(){
$($(this).attr("data-target")).modal('show');
});
});
Hope it helps.
Mark