| 2190 | * ====================== */ |
| 2191 | |
| 2192 | var Affix = function (element, options) { |
| 2193 | this.options = $.extend({}, $.fn.affix.defaults, options) |
| 2194 | this.$window = $(window) |
| 2195 | .on('scroll.affix.data-api', $.proxy(this.checkPosition, this)) |
| 2196 | .on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this)) |
| 2197 | this.$element = $(element) |
| 2198 | this.checkPosition() |
| 2199 | } |
| 2200 | |
| 2201 | Affix.prototype.checkPosition = function () { |
| 2202 | if (!this.$element.is(':visible')) return |