mirror of
https://github.com/twbs/bootstrap.git
synced 2025-06-02 00:01:57 -04:00
Merge pull request #10834 from Prinzhorn/master
Only preventDefault on click on [data-toggle="modal"] when the element is a link
This commit is contained in:
commit
bea46fca70
@ -218,7 +218,7 @@
|
|||||||
var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
|
var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
|
||||||
var option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
|
var option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
|
||||||
|
|
||||||
e.preventDefault()
|
if ($this.is('a')) e.preventDefault()
|
||||||
|
|
||||||
$target
|
$target
|
||||||
.modal(option, this)
|
.modal(option, this)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user