AlkantarClanX12
Current Path : /home/thanudqk/siamfreetour.com/wp-content/themes/thegem/js/ |
Current File : //home/thanudqk/siamfreetour.com/wp-content/themes/thegem/js/affix.min.js |
/*! * Bootstrap v3.2.0 (http://getbootstrap.com) * Copyright 2011-2014 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ /*! * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=a7bf4babec4e922d0e69) * Config saved to config.json and https://gist.github.com/a7bf4babec4e922d0e69 */ if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),f=o.data("bs.affix"),n="object"==typeof e&&e;f||o.data("bs.affix",f=new i(this,n)),"string"==typeof e&&f[e]()})}var i=function(e,o){this.options=t.extend({},i.DEFAULTS,o),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};i.VERSION="3.2.0",i.RESET="affix affix-top affix-bottom",i.DEFAULTS={offset:0,target:window},i.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(i.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},i.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},i.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=t(document).height(),o=this.$target.scrollTop(),f=this.$element.offset(),n=this.options.offset,s=n.top,a=n.bottom;"object"!=typeof n&&(a=s=n),"function"==typeof s&&(s=n.top(this.$element)),"function"==typeof a&&(a=n.bottom(this.$element));var h=null!=this.unpin&&o+this.unpin<=f.top?!1:null!=a&&f.top+this.$element.height()>=e-a?"bottom":null!=s&&s>=o?"top":!1;if(this.affixed!==h){null!=this.unpin&&this.$element.css("top","");var r="affix"+(h?"-"+h:""),p=t.Event(r+".bs.affix");this.$element.trigger(p),p.isDefaultPrevented()||(this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(i.RESET).addClass(r).trigger(t.Event(r.replace("affix","affixed"))),"bottom"==h&&this.$element.offset({top:e-this.$element.height()-a}))}}};var o=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=i,t.fn.affix.noConflict=function(){return t.fn.affix=o,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var i=t(this),o=i.data();o.offset=o.offset||{},o.offsetBottom&&(o.offset.bottom=o.offsetBottom),o.offsetTop&&(o.offset.top=o.offsetTop),e.call(i,o)})})}(jQuery);