Created by: ryan-endacott
When a modal is triggered by a button, the button is now passed as a relatedTarget to the 'shown' event as mentioned in #6159 (closed).
Also added show event as referenced in #6205 (closed)
Ex:
$('#myModal').on('shown', function (e) {
// e.relatedTarget is the element that triggered the modal
})
Tested on IE9, Firefox 14, and Chrome 23.
Resubmit of #6173. I took Fat's suggestion: The source button is now passed through event.relatedTarget. If there is something I have done wrong or a different branch to commit to please let me know :)