mirror of
https://github.com/Hopiu/bootstrap.git
synced 2026-03-26 17:20:29 +00:00
check affix pos on clicks - use timeout for clicks which scroll
This commit is contained in:
parent
aec8b08930
commit
0540b63ab0
4 changed files with 10 additions and 4 deletions
4
docs/assets/js/bootstrap-affix.js
vendored
4
docs/assets/js/bootstrap-affix.js
vendored
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
4
docs/assets/js/bootstrap.js
vendored
4
docs/assets/js/bootstrap.js
vendored
|
|
@ -1955,7 +1955,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()
|
||||
}
|
||||
|
|
|
|||
2
docs/assets/js/bootstrap.min.js
vendored
2
docs/assets/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
4
js/bootstrap-affix.js
vendored
4
js/bootstrap-affix.js
vendored
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue