Twitter bootstrap remote modal shows same content every time

前端 未结 22 1268
春和景丽
春和景丽 2020-11-22 12:29

I am using Twitter bootstrap, I have specified a modal

<
22条回答
  •  Happy的楠姐
    2020-11-22 13:27

    I've added something like this, because the older content is shown until the new one appears, with .html('') inside the .modal-content will clear the HTML inside, hope it helps

    $('#myModal').on('hidden.bs.modal', function () {
       $('#myModal').removeData('bs.modal');
       $('#myModal').find('.modal-content').html('');
    });
    

提交回复
热议问题