Skip to content

Commit

Permalink
add bs- prefix to tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
fat committed May 17, 2013
1 parent 149ecd2 commit 19de2e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
Tooltip.prototype.hide = function () {
var that = this
var $tip = this.tip()
var e = $.Event('hide')
var e = $.Event('bs:' + this.type + ':hide')

this.$element.trigger(e)

Expand Down Expand Up @@ -329,10 +329,10 @@
$.fn.tooltip = function ( option ) {
return this.each(function () {
var $this = $(this)
var data = $this.data('tooltip')
var data = $this.data('bs-tooltip')
var options = typeof option == 'object' && option

if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
if (!data) $this.data('bs-tooltip', (data = new Tooltip(this, options)))
if (typeof option == 'string') data[option]()
})
}
Expand Down

0 comments on commit 19de2e8

Please sign in to comment.