1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-25 21:09:06 +02:00

all unit tests passing in ie7

This commit is contained in:
Jacob Thornton
2012-01-28 01:35:13 -08:00
parent 81c128fd0b
commit e61164e67a
10 changed files with 39 additions and 19 deletions

View File

@@ -193,8 +193,8 @@
$(function () {
$('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
var $this = $(this)
, $target = $($this.attr('data-target') || $this.attr('href'))
var $this = $(this), href
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
, option = $target.data('modal') ? 'toggle' : $.extend({}, $target.data(), $this.data())
e.preventDefault()