Add hideTooltip function to hide the tip right now.

This commit is contained in:
Ben Ogle
2013-11-26 15:35:47 -08:00
parent d3c9b6e547
commit 413078a493

View File

@@ -76,6 +76,12 @@ jQuery.fn.setTooltip = (tooltipOptions, {command, commandElement}={}) ->
this.tooltip(jQuery.extend({}, tooltipDefaults, tooltipOptions))
jQuery.fn.hideTooltip = ->
tip = @data('bs.tooltip')
if tip
tip.leave(currentTarget: this)
tip.hide()
jQuery.fn.setTooltip.getKeystroke = getKeystroke
jQuery.fn.setTooltip.replaceModifiers = replaceModifiers