Answers for "how to check if bootstrap modal is open"

0

bootstrap modal show event

$('#code').on('shown.bs.modal', function (e) {
  // do something...
})
Posted by: Guest on June-03-2021
0

how to check if bootstrap modal is open

$('#myModal').is(':visible');
Posted by: Guest on August-06-2021
0

how to check if bootstrap modal is open

$('#myModal').is(':visible');   
 $('#myModal').data('bs.modal').isShown ;        
 $('#myModal').hasClass('in');
Posted by: Guest on August-06-2021
0

how to check if bootstrap modal is open

($("element").data('bs.modal') || {})._isShown    // Bootstrap 4
($("element").data('bs.modal') || {}).isShown     // Bootstrap <= 3

// or, with the optional chaining operator (?.)
$("element").data('bs.modal')?._isShown    // Bootstrap 4
$("element").data('bs.modal')?.isShown     // Bootstrap <= 3
Posted by: Guest on August-06-2021
0

how to check if bootstrap modal is open

$('#myModal').hasClass('in');
Posted by: Guest on August-06-2021

Code answers related to "how to check if bootstrap modal is open"

Browse Popular Code Answers by Language