vendor/assets/javascripts/tooltip.js in active_frontend-1.0.11 vs vendor/assets/javascripts/tooltip.js in active_frontend-2.0.0

- old
+ new

@@ -13,11 +13,11 @@ this.$element = null this.init('tooltip', element, options) } - Tooltip.VERSION = '3.3.2' + Tooltip.VERSION = '3.3.4' Tooltip.TRANSITION_DURATION = 150 Tooltip.DEFAULTS = { animation: true, @@ -41,11 +41,11 @@ this.$element = $(element) this.options = this.getOptions(options) this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport) if (this.$element[0] instanceof document.constructor && !this.options.selector) { - throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!'); + throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!') } var triggers = this.options.trigger.split(' ') for (var i = triggers.length; i--;) { @@ -441,10 +441,10 @@ return this.each(function () { var $this = $(this) var data = $this.data('bs.tooltip') var options = typeof option == 'object' && option - if (!data && option == 'destroy') return + if (!data && /destroy|hide/.test(option)) return if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) if (typeof option == 'string') data[option]() }) } \ No newline at end of file