user3582431
user3582431

Reputation: 11

Bootstrap after closing the modal set the focus to invoked element?

I am using bootstrap 3.0.0. I am facing a small problem in bootstrap modal, I want to set the focus to the element which invoked the modal window after closing the current modal window.

Upvotes: 1

Views: 2253

Answers (1)

Blazemonger
Blazemonger

Reputation: 92893

Use Bootstrap's custom events:

$('#myModal').on('hide.bs.modal', function (e) {
  // do something...
});

http://getbootstrap.com/javascript/#modals (last sub-section)

Upvotes: 3

Related Questions