diff options
| author | Jacob Thornton <[email protected]> | 2012-09-24 23:59:02 -0700 |
|---|---|---|
| committer | Jacob Thornton <[email protected]> | 2012-09-24 23:59:02 -0700 |
| commit | 0540b63ab0a2f9359fbd34967fbb74402534573f (patch) | |
| tree | 90aea86837bcacbd1dd2de198f5844e66d911391 /js | |
| parent | aec8b089307d6bc8787aceb7001313e3751048c1 (diff) | |
| download | bootstrap-0540b63ab0a2f9359fbd34967fbb74402534573f.tar.xz bootstrap-0540b63ab0a2f9359fbd34967fbb74402534573f.zip | |
check affix pos on clicks - use timeout for clicks which scroll
Diffstat (limited to '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 96bf420d2..c6b9e97b6 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() } |
