| 2229 | // ====================== |
| 2230 | |
| 2231 | var Affix = function (element, options) { |
| 2232 | this.options = $.extend({}, Affix.DEFAULTS, options) |
| 2233 | |
| 2234 | this.$target = $(this.options.target) |
| 2235 | .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) |
| 2236 | .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) |
| 2237 | |
| 2238 | this.$element = $(element) |
| 2239 | this.affixed = null |
| 2240 | this.unpin = null |
| 2241 | this.pinnedOffset = null |
| 2242 | |
| 2243 | this.checkPosition() |
| 2244 | } |
| 2245 | |
| 2246 | Affix.VERSION = '3.3.7' |
| 2247 | |