����JFIF��x�x����'
Server IP : 66.29.137.217 / Your IP : 18.226.163.178 Web Server : LiteSpeed System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : gltevjme ( 1095) PHP Version : 7.0.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/gltevjme/./gle.gltechlimited.com/public/assets/plugins/vertical-timeline/ |
Upload File : |
(function(){ // Vertical Timeline - by CodyHouse.co function VerticalTimeline( element ) { this.element = element; this.blocks = this.element.getElementsByClassName("block-js"); this.images = this.element.getElementsByClassName("img-js"); this.contents = this.element.getElementsByClassName("content-js"); this.offset = 0.8; this.hideBlocks(); }; VerticalTimeline.prototype.hideBlocks = function() { //hide timeline blocks which are outside the viewport if ( !"classList" in document.documentElement ) { return; } var self = this; for( var i = 0; i < this.blocks.length; i++) { (function(i){ if( self.blocks[i].getBoundingClientRect().top > window.innerHeight*self.offset ) { self.images[i].classList.add("is-hidden"); self.contents[i].classList.add("is-hidden"); } })(i); } }; VerticalTimeline.prototype.showBlocks = function() { if ( ! "classList" in document.documentElement ) { return; } var self = this; for( var i = 0; i < this.blocks.length; i++) { (function(i){ if( self.contents[i].classList.contains("is-hidden") && self.blocks[i].getBoundingClientRect().top <= window.innerHeight*self.offset ) { // add bounce-in animation self.images[i].classList.add("timeline-img--bounce-in"); self.contents[i].classList.add("timeline-content--bounce-in"); self.images[i].classList.remove("is-hidden"); self.contents[i].classList.remove("is-hidden"); } })(i); } }; var verticalTimelines = document.getElementsByClassName("timeline-js"), verticalTimelinesArray = [], scrolling = false; if( verticalTimelines.length > 0 ) { for( var i = 0; i < verticalTimelines.length; i++) { (function(i){ verticalTimelinesArray.push(new VerticalTimeline(verticalTimelines[i])); })(i); } //show timeline blocks on scrolling window.addEventListener("scroll", function(event) { if( !scrolling ) { scrolling = true; (!window.requestAnimationFrame) ? setTimeout(checkTimelineScroll, 250) : window.requestAnimationFrame(checkTimelineScroll); } }); } function checkTimelineScroll() { verticalTimelinesArray.forEach(function(timeline){ timeline.showBlocks(); }); scrolling = false; }; })();