1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-26 21:39:08 +02:00

some progress on affix plugin

This commit is contained in:
Jacob Thornton
2012-07-22 18:28:39 -07:00
parent fa1e1e34df
commit dcf75697ec
39 changed files with 503 additions and 221 deletions

View File

@@ -47,8 +47,8 @@
if (this.options.trigger != 'manual') {
eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus'
eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur'
this.$element.on(eventIn, this.options.selector, $.proxy(this.enter, this))
this.$element.on(eventOut, this.options.selector, $.proxy(this.leave, this))
this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
}
this.options.selector ?
@@ -176,6 +176,8 @@
$.support.transition && this.$tip.hasClass('fade') ?
removeWithAnimation() :
$tip.remove()
return this
}
, fixTitle: function () {
@@ -236,7 +238,7 @@
}
, destroy: function () {
this.$element.off().removeData('tooltip')
this.hide().$element.off('.' + this.type).removeData(this.type)
}
}