diff options
| author | fat <[email protected]> | 2013-05-16 20:19:51 -0700 |
|---|---|---|
| committer | fat <[email protected]> | 2013-05-16 20:19:51 -0700 |
| commit | 140ef2320bbb96ad90b73a884d83198706affaf9 (patch) | |
| tree | 4de562f3c4fa8d989de16ebe61fd07732109a9e5 /js/tooltip.js | |
| parent | 5ab72f76878a85f105702a24096268fea73fba2d (diff) | |
| download | bootstrap-140ef2320bbb96ad90b73a884d83198706affaf9.tar.xz bootstrap-140ef2320bbb96ad90b73a884d83198706affaf9.zip | |
change namespace back to dot notation and someother js shizzle
Diffstat (limited to 'js/tooltip.js')
| -rw-r--r-- | js/tooltip.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/js/tooltip.js b/js/tooltip.js index aa535d196..be9ac251d 100644 --- a/js/tooltip.js +++ b/js/tooltip.js @@ -99,7 +99,7 @@ if (defaults[key] != value) options[key] = value }, this) - var self = $(e.currentTarget)[this.type](options).data('bs-' + 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('bs-' + 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() @@ -124,7 +124,7 @@ } Tooltip.prototype.show = function () { - var e = $.Event('bs:'+ this.type + ':show') + var e = $.Event('show.bs.'+ this.type) if (this.hasContent() && this.enabled) { this.$element.trigger(e) @@ -168,7 +168,7 @@ } this.applyPlacement(tp, placement) - this.$element.trigger('bs:' + this.type + ':shown') + this.$element.trigger('shown.bs.' + this.type) } } @@ -227,7 +227,7 @@ Tooltip.prototype.hide = function () { var that = this var $tip = this.tip() - var e = $.Event('bs:' + this.type + ':hide') + var e = $.Event('hide.bs.' + this.type) this.$element.trigger(e) @@ -250,7 +250,7 @@ removeWithAnimation() : $tip.detach() - this.$element.trigger('bs:' + this.type + ':hidden') + this.$element.trigger('hidden.bs.' + this.type) return this } @@ -314,12 +314,12 @@ } 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() } Tooltip.prototype.destroy = function () { - this.hide().$element.off('.' + this.type).removeData('bs-' + this.type) + this.hide().$element.off('.' + this.type).removeData('bs.' + this.type) } @@ -331,10 +331,10 @@ $.fn.tooltip = function (option) { return this.each(function () { var $this = $(this) - var data = $this.data('bs-tooltip') + var data = $this.data('bs.tooltip') var options = typeof option == 'object' && option - if (!data) $this.data('bs-tooltip', (data = new Tooltip(this, options))) + if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) if (typeof option == 'string') data[option]() }) } |
