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