1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-26 05:19:15 +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

10
js/bootstrap-alert.js vendored
View File

@@ -36,9 +36,15 @@
, close: function ( e ) {
var $this = $(this)
, selector = $this.attr('data-target') || $this.attr('href')
, $parent = $(selector)
, selector = $this.attr('data-target')
, $parent
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
$parent = $(selector)
$parent.trigger('close')
e && e.preventDefault()