Hi!
I have a stacked modal on my page, and I want to close it by javascript.
I´m using the modal.hide() but nothing is happening.
<div class="modal fade" tabindex="-1" id="modal_stacked_nova_colecao"></div>
modalColecao = new bootstrap.Modal(document.querySelector("#modal_stacked_nova_colecao"));
modalColecao.hide(); // Hide modal<pre lang="html">
This might help you
https://devs.keenthemes.com/question/metronic-bootstrap-instance-is-undefined
Hi,
Can you share your test URL so we can check it online and see the JS console?
Have you checked modalColecao variable before calling the hide method? Is it initialized and represents a valid Modal object?
Regards.