Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJacob Thornton <jacobthornton@gmail.com>2012-09-25 10:59:02 +0400
committerJacob Thornton <jacobthornton@gmail.com>2012-09-25 10:59:02 +0400
commit0540b63ab0a2f9359fbd34967fbb74402534573f (patch)
tree90aea86837bcacbd1dd2de198f5844e66d911391 /js
parentaec8b089307d6bc8787aceb7001313e3751048c1 (diff)
check affix pos on clicks - use timeout for clicks which scroll
Diffstat (limited to 'js')
-rw-r--r--js/bootstrap-affix.js4
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()
}