]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
fixes tooltip('toggle')
authorYohn <john.skem9@gmail.com>
Thu, 20 Dec 2012 09:34:28 +0000 (04:34 -0500)
committerYohn <john.skem9@gmail.com>
Thu, 20 Dec 2012 09:34:28 +0000 (04:34 -0500)
js/bootstrap-tooltip.js

index 25bba15892500ce185b20582cdb3d129dd9fa534..221d3ef7b66b3e7c28ca3468bf9905d2dc6cf75d 100644 (file)
     }
 
   , toggle: function (e) {
-      var self = $(e.currentTarget)[this.type](this._options).data(this.type)
-      self[self.tip().hasClass('in') ? 'hide' : 'show']()
+      var self = e ? $(e.currentTarget)[this.type](this._options).data(this.type) : this
+      self.tip().hasClass('in') ? self.hide() : self.show()
     }
 
   , destroy: function () {
     return this
   }
 
-}(window.jQuery);
\ No newline at end of file
+}(window.jQuery);