3
3
33balabol2016-07-31 21:00:06
JavaScript
33balabol, 2016-07-31 21:00:06

How to hide bootstrap object via JS?

The essence of what is happening comes from an open bootstrap modal window with a button, for example, "Update block". In this block there was a script with the same modal window.
The block is updated via ajax. The modal window disappears as it should. But the bootstrap block darkening the background remains.
<div class="modal-backdrop fade in"></div>
How to remove it through js?
Tried like this:
$(".modal-backdrop, .in").hide();
and like this:
$(".modal-backdrop.in").hide();
Doesn't work.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Alexandrovich, 2016-07-31
@33balabol

No need to invent anything here, read the documentation you can specify through its object:

$('.modal-backdrop').modal({
show : false
})

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question