mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-25 12:59:05 +02:00
all unit tests passing in ie7
This commit is contained in:
13
js/bootstrap-tab.js
vendored
13
js/bootstrap-tab.js
vendored
@@ -36,9 +36,14 @@
|
||||
, show: function () {
|
||||
var $this = this.element
|
||||
, $ul = $this.closest('ul:not(.dropdown-menu)')
|
||||
, href = $this.attr('data-target') || $this.attr('href')
|
||||
, selector = $this.attr('data-target')
|
||||
, previous
|
||||
, $href
|
||||
, $target
|
||||
|
||||
if (!selector) {
|
||||
selector = $this.attr('href')
|
||||
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
||||
}
|
||||
|
||||
if ( $this.parent('li').hasClass('active') ) return
|
||||
|
||||
@@ -49,10 +54,10 @@
|
||||
, relatedTarget: previous
|
||||
})
|
||||
|
||||
$href = $(href)
|
||||
$target = $(selector)
|
||||
|
||||
this.activate($this.parent('li'), $ul)
|
||||
this.activate($href, $href.parent(), function () {
|
||||
this.activate($target, $target.parent(), function () {
|
||||
$this.trigger({
|
||||
type: 'shown'
|
||||
, relatedTarget: previous
|
||||
|
Reference in New Issue
Block a user