vendor/assets/javascripts/bootstrap/bootstrap-affix.js in jombo-1.0.10 vs vendor/assets/javascripts/bootstrap/bootstrap-affix.js in jombo-1.0.11
- old
+ new
@@ -1,7 +1,7 @@
/* ==========================================================
- * bootstrap-affix.js v2.1.1
+ * bootstrap-affix.js v2.3.1
* http://twitter.github.com/bootstrap/javascript.html#affix
* ==========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -26,11 +26,13 @@
/* AFFIX CLASS DEFINITION
* ====================== */
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()
}
Affix.prototype.checkPosition = function () {
@@ -64,10 +66,12 @@
/* AFFIX PLUGIN DEFINITION
* ======================= */
+ var old = $.fn.affix
+
$.fn.affix = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('affix')
, options = typeof option == 'object' && option
@@ -78,9 +82,18 @@
$.fn.affix.Constructor = Affix
$.fn.affix.defaults = {
offset: 0
+ }
+
+
+ /* AFFIX NO CONFLICT
+ * ================= */
+
+ $.fn.affix.noConflict = function () {
+ $.fn.affix = old
+ return this
}
/* AFFIX DATA-API
* ============== */
\ No newline at end of file