diff options
Diffstat (limited to 'xstatic/pkg/bootstrap_scss/data/js/bootstrap/affix.js')
-rw-r--r-- | xstatic/pkg/bootstrap_scss/data/js/bootstrap/affix.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/xstatic/pkg/bootstrap_scss/data/js/bootstrap/affix.js b/xstatic/pkg/bootstrap_scss/data/js/bootstrap/affix.js index 7f65168..ad62904 100644 --- a/xstatic/pkg/bootstrap_scss/data/js/bootstrap/affix.js +++ b/xstatic/pkg/bootstrap_scss/data/js/bootstrap/affix.js @@ -1,8 +1,8 @@ /* ======================================================================== - * Bootstrap: affix.js v3.3.7 - * http://getbootstrap.com/javascript/#affix + * Bootstrap: affix.js v3.4.1 + * https://getbootstrap.com/docs/3.4/javascript/#affix * ======================================================================== - * Copyright 2011-2016 Twitter, Inc. + * Copyright 2011-2019 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */ @@ -16,7 +16,9 @@ var Affix = function (element, options) { this.options = $.extend({}, Affix.DEFAULTS, options) - this.$target = $(this.options.target) + var target = this.options.target === Affix.DEFAULTS.target ? $(this.options.target) : $(document).find(this.options.target) + + this.$target = target .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) @@ -28,7 +30,7 @@ this.checkPosition() } - Affix.VERSION = '3.3.7' + Affix.VERSION = '3.4.1' Affix.RESET = 'affix affix-top affix-bottom' |