How clear bootstrap modal on hide

后端 未结 3 602
庸人自扰
庸人自扰 2021-02-19 04:52

How to can you clear the bootstrap modal on dismiss/hide/close?

I have the following Modal definition:

3条回答
  •  独厮守ぢ
    2021-02-19 05:43

    This worked for me

    $('body').on('hidden.bs.modal', '.modal', function () {
            $(".modal-content").empty();
          });
    

提交回复
热议问题