| 1288 | * ====================== */ |
| 1289 | |
| 1290 | var Affix = function (element, options) { |
| 1291 | this.options = $.extend({}, $.fn.affix.defaults, options) |
| 1292 | this.$window = $(window) |
| 1293 | .on('scroll.affix.data-api', $.proxy(this.checkPosition, this)) |
| 1294 | .on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this)) |
| 1295 | this.$element = $(element) |
| 1296 | this.checkPosition() |
| 1297 | } |
| 1298 | |
| 1299 | Affix.prototype.checkPosition = function () { |
| 1300 | if (!this.$element.is(':visible')) return |