PHP Classes

File: engine/modules/contrib/foundation/js/plugins/foundation.util.timerAndImageLoader.min.js

Recommend this page to a friend!
  Classes of Aldo Tripiciano   Quanta CMS   engine/modules/contrib/foundation/js/plugins/foundation.util.timerAndImageLoader.min.js   Download  
File: engine/modules/contrib/foundation/js/plugins/foundation.util.timerAndImageLoader.min.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Quanta CMS
Manage content that works without a database
Author: By
Last change:
Date: 5 years ago
Size: 864 bytes
 

Contents

Class file image Download
"use strict";!function(t){function e(t,e,i){var a,s,n=this,r=e.duration,o=Object.keys(t.data())[0]||"timer",u=-1;this.isPaused=!1,this.restart=function(){u=-1,clearTimeout(s),this.start()},this.start=function(){this.isPaused=!1,clearTimeout(s),u=u<=0?r:u,t.data("paused",!1),a=Date.now(),s=setTimeout(function(){e.infinite&&n.restart(),i&&"function"==typeof i&&i()},u),t.trigger("timerstart.zf."+o)},this.pause=function(){this.isPaused=!0,clearTimeout(s),t.data("paused",!0);var e=Date.now();u-=e-a,t.trigger("timerpaused.zf."+o)}}function i(e,i){function a(){s--,0===s&&i()}var s=e.length;0===s&&i(),e.each(function(){if(this.complete||4===this.readyState||"complete"===this.readyState)a();else{var e=t(this).attr("src");t(this).attr("src",e+"?"+(new Date).getTime()),t(this).one("load",function(){a()})}})}Foundation.Timer=e,Foundation.onImagesLoaded=i}(jQuery);