Tryag File Manager
Home
||
Turbo Force
||
B-F Config_Cpanel
Current Path :
/
home
/
yanggyein
/
yanggyein
/
yang_home
/
resources
/
js
/
modules
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/yanggyein/yanggyein/yang_home/resources/js/modules/sticky.min.js
!function(t){var e={};function i(s){if(e[s])return e[s].exports;var o=e[s]={i:s,l:!1,exports:{}};return t[s].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=e,i.d=function(t,e,s){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(s,o,function(e){return t[e]}.bind(null,o));return s},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=217)}({217:function(t,e){function i(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}jQuery((function(t){var e=function(){function e(i,s){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.defaults={topSpacing:0,zIndex:!1,stopper:"#footer",stickyClass:!1,startScrolling:"top",minWidth:!1},this.$element=i,this.options=this.assignOptions(s),this.$window=t(window),this.stopper=this.options.stopper,this.elementWidth=this.$element.outerWidth(),this.elementHeight=this.$element.outerHeight(!0),this.initialScrollTop=this.$element.offset().top,this.$placeholder=t('<div class="sticky-placeholder"></div>'),this.scrollTop=0,this.setPushPoint(),this.setStopperPosition(),this.bindEvents()}var s,o,n;return s=e,(o=[{key:"hasZIndex",value:function(){return"number"==typeof this.options.zIndex}},{key:"hasStopper",value:function(){return t(this.options.stopper).length||"number"==typeof this.options.stopper}},{key:"isScreenHeightEnough",value:function(){return this.$element.outerHeight()+this.options.topSpacing<this.$window.height()}},{key:"assignOptions",value:function(e){return t.extend({},this.defaults,e)}},{key:"setPushPoint",value:function(){"bottom"!==this.options.startScrolling||this.isScreenHeightEnough()?this.$pushPoint=this.initialScrollTop-this.options.topSpacing:this.$pushPoint=this.initialScrollTop+this.$element.outerHeight(!0)-this.$window.height()}},{key:"setStopperPosition",value:function(){"string"==typeof this.options.stopper?this.stopPoint=t(this.stopper).offset().top-this.options.topSpacing:"number"==typeof this.options.stopper&&(this.stopPoint=this.options.stopper)}},{key:"bindEvents",value:function(){this.$window.on("resize",this.handleResize.bind(this)),this.$window.on("scroll",this.init.bind(this))}},{key:"handleResize",value:function(){var t=this.$element.parent();this.elementWidth=t.width(),this.elementHeight=this.$element.outerHeight(!0),this.setPushPoint(),this.setStopperPosition(),this.init()}},{key:"init",value:function(){if(this.options.minWidth&&this.options.minWidth>this.$window.innerWidth())return!1;"bottom"!==this.options.startScrolling||this.isScreenHeightEnough()?this.scrollTop=this.$window.scrollTop():this.scrollTop=this.$window.scrollTop()+this.$window.height(),this.$pushPoint<this.scrollTop?(this.appendPlaceholder(),this.stickyStart()):this.stickyEnd(),this.$window.scrollTop()>this.$pushPoint?this.stop():this.stickyEnd()}},{key:"appendPlaceholder",value:function(){this.$element.after(this.$placeholder),this.$placeholder.css({width:this.elementWidth,height:this.elementHeight})}},{key:"stickyStart",value:function(){this.options.stickyClass&&this.$element.addClass(this.options.stickyClass),this.$element.get(0).style.overflow="scroll";var t=this.$element.get(0).scrollHeight;this.$element.get(0).style.overflow="",this.$element.css({position:"fixed",width:this.elementWidth,height:t}),"bottom"!==this.options.startScrolling||this.isScreenHeightEnough()?this.$element.css({top:this.options.topSpacing}):this.$element.css({bottom:0,top:""}),this.hasZIndex()&&this.$element.css({zIndex:this.options.zIndex})}},{key:"stickyEnd",value:function(){this.options.stickyClass&&this.$element.removeClass(this.options.stickyClass),this.$placeholder.remove(),this.$element.css({position:"static",top:this.options.topSpacing,width:"",height:""})}},{key:"stop",value:function(){this.stopPoint<t(this.$element).offset().top-this.options.topSpacing+this.$element.outerHeight(!0)&&this.$element.css({position:"absolute",bottom:0,top:""})}}])&&i(s.prototype,o),n&&i(s,n),e}();t.fn.sticky=function(i){t(this).each((function(){new e(t(this),i).init()}))}}))}}); //# sourceMappingURL=sticky.min.js.map