Answers for "how to open bootstrap modal on button click"

C#
6

open bootstrap modal with javascript

$("#myModal").modal()
Posted by: Guest on July-21-2020
1

bootstrap modal show event

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

bootstrap pop modal from another modal

// Hide current modal before opening new one
$("#idModal").modal('hide');
$("#idModal2").modal() // or .modal("show");

// show 1st modal again after closing 2nd modal
$("#idModal2").on('hidden.bs.modal', () => $("#idModal").modal('show'))
// using hide.bs.modal might cause modal to stop scrolling!!!
Posted by: Guest on April-07-2021

Code answers related to "how to open bootstrap modal on button click"

C# Answers by Framework

Browse Popular Code Answers by Language