diff options
author | Jacob Thornton <jacobthornton@gmail.com> | 2012-09-25 10:59:02 +0400 |
---|---|---|
committer | Jacob Thornton <jacobthornton@gmail.com> | 2012-09-25 10:59:02 +0400 |
commit | 0540b63ab0a2f9359fbd34967fbb74402534573f (patch) | |
tree | 90aea86837bcacbd1dd2de198f5844e66d911391 /js/bootstrap-affix.js | |
parent | aec8b089307d6bc8787aceb7001313e3751048c1 (diff) |
check affix pos on clicks - use timeout for clicks which scroll
Diffstat (limited to 'js/bootstrap-affix.js')
-rw-r--r-- | js/bootstrap-affix.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/js/bootstrap-affix.js b/js/bootstrap-affix.js index 96bf420d24..c6b9e97b62 100644 --- a/js/bootstrap-affix.js +++ b/js/bootstrap-affix.js @@ -28,7 +28,9 @@ var Affix = function (element, options) { this.options = $.extend({}, $.fn.affix.defaults, options) - this.$window = $(window).on('scroll.affix.data-api', $.proxy(this.checkPosition, this)) + this.$window = $(window) + .on('scroll.affix.data-api', $.proxy(this.checkPosition, this)) + .on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this)) this.$element = $(element) this.checkPosition() } |