Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfat <jacobthornton@gmail.com>2013-05-17 05:15:34 +0400
committerfat <jacobthornton@gmail.com>2013-05-17 05:15:34 +0400
commitf37b351288883cca4ea435827b10fe6d8475dc6e (patch)
treee29d493a4e8b630acb6b75371ffb5335eb8ca65b /docs/assets/js/tooltip.js
parenta72d0d6e3a5f2691eaa7e036a7b081d021097159 (diff)
only overlay dropdowns for mobile
Diffstat (limited to 'docs/assets/js/tooltip.js')
-rw-r--r--docs/assets/js/tooltip.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/docs/assets/js/tooltip.js b/docs/assets/js/tooltip.js
index 5f99e355fe..a40d242fcb 100644
--- a/docs/assets/js/tooltip.js
+++ b/docs/assets/js/tooltip.js
@@ -48,10 +48,10 @@
}
Tooltip.prototype.init = function (type, element, options) {
- this.type = type
- this.options = this.getOptions(options)
this.enabled = true
+ this.type = type
this.$element = $(element)
+ this.options = this.getOptions(options)
var triggers = this.options.trigger.split(' ')
@@ -99,7 +99,7 @@
if (defaults[key] != value) options[key] = value
}, this)
- var self = $(e.currentTarget)[this.type](options).data(this.type)
+ var self = $(e.currentTarget)[this.type](options).data('bs-' + this.type)
if (!self.options.delay || !self.options.delay.show) return self.show()
@@ -112,7 +112,7 @@
}
Tooltip.prototype.leave = function (e) {
- var self = $(e.currentTarget)[this.type](this._options).data(this.type)
+ var self = $(e.currentTarget)[this.type](this._options).data('bs-' + this.type)
if (this.timeout) clearTimeout(this.timeout)
if (!self.options.delay || !self.options.delay.hide) return self.hide()
@@ -168,7 +168,7 @@
}
this.applyPlacement(tp, placement)
- this.$element.trigger('shown')
+ this.$element.trigger('bs:' + this.type + ':shown')
}
}
@@ -250,7 +250,7 @@
removeWithAnimation() :
$tip.detach()
- this.$element.trigger('hidden')
+ this.$element.trigger('bs:' + this.type + ':hidden')
return this
}
@@ -314,12 +314,12 @@
}
Tooltip.prototype.toggle = function (e) {
- var self = e ? $(e.currentTarget)[this.type](this._options).data(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()
}
Tooltip.prototype.destroy = function () {
- this.hide().$element.off('.' + this.type).removeData(this.type)
+ this.hide().$element.off('.' + this.type).removeData('bs-' + this.type)
}