Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

bootstrap 4 open tab when opening modal

$('#modal-sensory').on('show.bs.modal', function (event) {    
  // Button that triggered the modal
  var button = $(event.relatedTarget)

  // the modal
  var modal = $(this);

  //show tab
  modal.find('[href="'+button.attr("href")+'"]').tab('show');
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #bootstrap #open #tab #opening #modal
ADD COMMENT
Topic
Name
9+6 =