mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-26 05:19:15 +02:00
bind data-api events to document instead of body to allow body replacement
This commit is contained in:
2
js/bootstrap-modal.js
vendored
2
js/bootstrap-modal.js
vendored
@@ -216,7 +216,7 @@
|
||||
* ============== */
|
||||
|
||||
$(function () {
|
||||
$('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
|
||||
$(document).on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
|
||||
var $this = $(this)
|
||||
, href = $this.attr('href')
|
||||
, $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
|
||||
|
Reference in New Issue
Block a user