Commit 9257bdc0 authored by fat's avatar fat

fixes #7163

parent 7cbb1c04
...@@ -448,6 +448,13 @@ ...@@ -448,6 +448,13 @@
e.preventDefault() e.preventDefault()
}) })
$(window).on('load', function () {
$('[data-ride="carousel"]').each(function () {
var $carousel = $(this)
$carousel.carousel($carousel.data())
})
})
}(window.jQuery); }(window.jQuery);
/* ======================================================================== /* ========================================================================
* Bootstrap: collapse.js v3.0.0 * Bootstrap: collapse.js v3.0.0
...@@ -1317,7 +1324,7 @@ ...@@ -1317,7 +1324,7 @@
Tooltip.prototype.toggle = function (e) { Tooltip.prototype.toggle = function (e) {
var self = e ? $(e.currentTarget)[this.type](this._options).data('bs.' + this.type) : this var self = e ? $(e.currentTarget)[this.type](this._options).data('bs.' + this.type) : this
self.tip().hasClass('in') ? self.hide() : self.show() self.tip().hasClass('in') ? self.leave(e) : self.enter(e)
} }
Tooltip.prototype.destroy = function () { Tooltip.prototype.destroy = function () {
......
This diff is collapsed.
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
return options return options
} }
Tooltip.prototype.enter = function (e) { Tooltip.prototype.enter = function (obj) {
var defaults = this.getDefaults() var defaults = this.getDefaults()
var options = {} var options = {}
...@@ -99,26 +99,29 @@ ...@@ -99,26 +99,29 @@
if (defaults[key] != value) options[key] = value if (defaults[key] != value) options[key] = value
}) })
var self = $(e.currentTarget)[this.type](options).data('bs.' + this.type) var self = obj instanceof this.constructor ?
obj : $(obj.currentTarget)[this.type](options).data('bs.' + this.type)
if (!self.options.delay || !self.options.delay.show) return self.show() if (!self.options.delay || !self.options.delay.show) return self.show()
clearTimeout(this.timeout) clearTimeout(this.timeout)
self.hoverState = 'in' self.hoverState = 'in'
this.timeout = setTimeout(function() { this.timeout = setTimeout(function () {
if (self.hoverState == 'in') self.show() if (self.hoverState == 'in') self.show()
}, self.options.delay.show) }, self.options.delay.show)
} }
Tooltip.prototype.leave = function (e) { Tooltip.prototype.leave = function (obj) {
var self = $(e.currentTarget)[this.type](this._options).data('bs.' + this.type) var self = obj instanceof this.constructor ?
obj : $(obj.currentTarget)[this.type](this._options).data('bs.' + this.type)
clearTimeout(this.timeout)
if (this.timeout) clearTimeout(this.timeout)
if (!self.options.delay || !self.options.delay.hide) return self.hide() if (!self.options.delay || !self.options.delay.hide) return self.hide()
self.hoverState = 'out' self.hoverState = 'out'
this.timeout = setTimeout(function() { this.timeout = setTimeout(function () {
if (self.hoverState == 'out') self.hide() if (self.hoverState == 'out') self.hide()
}, self.options.delay.hide) }, self.options.delay.hide)
} }
...@@ -315,7 +318,7 @@ ...@@ -315,7 +318,7 @@
Tooltip.prototype.toggle = function (e) { Tooltip.prototype.toggle = function (e) {
var self = e ? $(e.currentTarget)[this.type](this._options).data('bs.' + this.type) : this var self = e ? $(e.currentTarget)[this.type](this._options).data('bs.' + this.type) : this
self.tip().hasClass('in') ? self.hide() : self.show() self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
} }
Tooltip.prototype.destroy = function () { Tooltip.prototype.destroy = function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment