Answer the question
In order to leave comments, you need to log in
How does bootstrap modal close on background click work?
Task:
When clicking on the darkened background of the modal window in the bootstrap, perform a certain function.
Problem:
The script is also executed when clicking on the content of the modal window, but it needs to be done only on the background.
My logic went like this:
$('.fade').on('click',function(){
console.log('Кликнули на затемненный фон');
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question