Commit 0540b63a authored by Jacob Thornton's avatar Jacob Thornton
Browse files

check affix pos on clicks - use timeout for clicks which scroll

parent aec8b089
5 merge requests!5565Boostraptest,!5450Fixed copy and paste caused typo in CAROUSEL DATA-API,!5326Replace watchr with node-supervisor,!5277Please delete,!5042Pagination Javascript Component
Showing with 10 additions and 4 deletions
+10 -4
...@@ -28,7 +28,9 @@ ...@@ -28,7 +28,9 @@
var Affix = function (element, options) { var Affix = function (element, options) {
this.options = $.extend({}, $.fn.affix.defaults, 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.$element = $(element)
this.checkPosition() this.checkPosition()
} }
......
...@@ -1955,7 +1955,9 @@ ...@@ -1955,7 +1955,9 @@
var Affix = function (element, options) { var Affix = function (element, options) {
this.options = $.extend({}, $.fn.affix.defaults, 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.$element = $(element)
this.checkPosition() this.checkPosition()
} }
......
This diff is collapsed.
...@@ -28,7 +28,9 @@ ...@@ -28,7 +28,9 @@
var Affix = function (element, options) { var Affix = function (element, options) {
this.options = $.extend({}, $.fn.affix.defaults, 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.$element = $(element)
this.checkPosition() this.checkPosition()
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment