| 2215 | // ====================== |
| 2216 | |
| 2217 | var Affix = function (element, options) { |
| 2218 | this.options = $.extend({}, Affix.DEFAULTS, options) |
| 2219 | |
| 2220 | this.$target = $(this.options.target) |
| 2221 | .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) |
| 2222 | .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) |
| 2223 | |
| 2224 | this.$element = $(element) |
| 2225 | this.affixed = null |
| 2226 | this.unpin = null |
| 2227 | this.pinnedOffset = null |
| 2228 | |
| 2229 | this.checkPosition() |
| 2230 | } |
| 2231 | |
| 2232 | Affix.VERSION = '3.3.5' |
| 2233 | |