how to destroy bootstrap modal window completely?

后端 未结 24 893
旧时难觅i
旧时难觅i 2020-11-29 18:51

I\'ve made use of modal window for a wizard implementation which has around 4,5 steps. I need to destroy it completely after the last step(

24条回答
  •  半阙折子戏
    2020-11-29 18:59

    only this worked for me

    $('body').on('hidden.bs.modal', '.modal', function() {
        $('selector').val('');
    });
    

    It is safe forcing selectors to make them blank since bootstrap and jquery version may be the reason of this problem

提交回复
热议问题