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(onFinish) and OnCancel step without having a page refresh. I can of course hide it, but hiding modal windows restores everything as such when i open up it again. Could anyone help me on this issue?
Thanks Any hints answers are helpful for me.
only this worked for me
It is safe forcing selectors to make them blank since bootstrap and jquery version may be the reason of this problem
If you have an iframe in your modal, you can remove its content by the following code:
If modal shadow remains darker and not going for showing more than one modal then this will be helpful
You can completely destroy a modal without page reloading by this way.
but it will completely remove modal from your html page. After this modal hide show will not work.
The power of jQuery.
$(selector).modal('hide').destroy();
will first remove sinds you might have the sliding affect and then removes the element completely, however if you want the user to be able to open the modal again after you finished the steps. you might just wanna update only the settings you wanna have reseted so for reseting all the inputs in your modal this would look like the following: