diff --git a/README.md b/README.md
index cb67824..20df57d 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-jqueryIntroLoader (version 1.1.3)
+jqueryIntroLoader (version 1.2.0)
===================================
a jQuery plugin for generate animated Intro Loading Pages.
@@ -51,6 +51,9 @@ This plugin use some tird party software to do something during animations.
[SpinJs](fgnass.github.io/spin.js/) and [jQueryEasing](http://gsgd.co.uk/sandbox/jquery/easing/)
###ChangeLogs
+**version 1.2.0**
+*------------------*
+New animation *"doubleLoader"* added.
**version 1.1.3**
*------------------*
white colored background added to the loader
@@ -68,4 +71,4 @@ some bug correction
**version 1.1.0**
*------------------*
-.stop() data method added (with 2 related new plugin options);
+.stop() data method added (with 2 related new plugin options);
\ No newline at end of file
diff --git a/demo/demo-doubleloader.html b/demo/demo-doubleloader.html
new file mode 100644
index 0000000..afb30af
--- /dev/null
+++ b/demo/demo-doubleloader.html
@@ -0,0 +1,85 @@
+
+
+
+ jQuery IntroLoader Demo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ jqueryIntroLoader demopage
+ DoubleLoader Animation Example
+
+ Back to Demos Index
+
+
+
Animation description
+
+ This is a simple demo of jqueryIntroLoader using "doubleLoader" animation.
+
+
+
+$("#element").introLoader({
+ animation: {
+ name: 'doubleLoader' ,
+ options: {
+ effect:'fadeOut',
+ ease: "easeInOutCirc",
+ style: 'fluoGreen',
+ delayTime: 500,
+ animationTime: 300,
+ progbarAnimationTime: 700,
+ progbarDelayAfter: 400
+ }
+ }
+});
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/demo/index.html b/demo/index.html
index 63a6814..b60f81f 100644
--- a/demo/index.html
+++ b/demo/index.html
@@ -28,6 +28,10 @@ SimpleLoader Animation
SimpleLoader: slideBottom + callback onAfter
SimpleLoader: slideUp + onBefore + callback onAfter
+ DoubleLoader Animation
+
New Start/Stop methods (from version 1.1.0)
Manual Plugin Start/Stop Example
diff --git a/dist/css/introLoader.css b/dist/css/introLoader.css
index fb7d247..a89ec7f 100644
--- a/dist/css/introLoader.css
+++ b/dist/css/introLoader.css
@@ -1,4 +1,4 @@
-/*!
+/*
* jQueryIntroLoader
* Animated intro loading pages
* http://factory.brainleaf.eu/jqueryIntroLoader
@@ -63,6 +63,101 @@
}
+/* ##################################################################################### */
+/* ANIMATION : doubleLoader */
+/* ##################################################################################### */
+.doubleIntroLoader {
+ background: transparent!important;
+}
+.introLoaderTop {
+ position: absolute;
+ top: 0;
+ right: 0;
+ left: 0;
+ height: 50%;
+ background-color: #333;
+}
+.introLoaderBottom {
+ position: absolute;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ height: 50%;
+ background-color: #333;
+}
+.doubleIntroLoaderProgBar {
+ position: absolute;
+ top: 50%;
+ margin-top: -10px;
+ width: 100%;
+ height: 20px;
+ background-color: #fff;
+ z-index: 9999999999999;
+}
+
+.doubleIntroLoaderProgBar span {
+ display: block;
+ width: 0;
+ height: 20px;
+ background-color: #555;
+}
+
+/* --> theme: light */
+.theme-light .introLoaderTop,
+.theme-light .introLoaderBottom {
+ background-color: #efefef;
+}
+.theme-light .doubleIntroLoaderProgBar {
+ background-color: #ccc;
+}
+.theme-light .doubleIntroLoaderProgBar span {
+ background-color: #555;
+}
+
+/* --> theme: dark */
+.theme-dark .introLoaderTop,
+.theme-dark .introLoaderBottom {
+ background-color: #333;
+}
+.theme-dark .doubleIntroLoaderProgBar {
+ background-color: #fff;
+}
+.theme-dark .doubleIntroLoaderProgBar span {
+ background-color: #555;
+}
+/* --> theme: fluoGreen */
+.theme-fluoGreen .introLoaderTop,
+.theme-fluoGreen .introLoaderBottom {
+ background-color: #67de0f;
+}
+.theme-fluoGreen .doubleIntroLoaderProgBar {
+ background-color: #fff;
+}
+.theme-fluoGreen .doubleIntroLoaderProgBar span {
+ background-color: #dcff1b;
+}
+/* --> theme: fluoMagenta */
+.theme-fluoMagenta .introLoaderTop,
+.theme-fluoMagenta .introLoaderBottom {
+ background-color: #ff1bff;
+}
+.theme-fluoMagenta .doubleIntroLoaderProgBar {
+ background-color: #fff;
+}
+.theme-fluoMagenta .doubleIntroLoaderProgBar span {
+ background-color: #ccc;
+}
+/* --> theme: fluoYellow */
+.theme-fluoYellow .introLoaderTop,
+.theme-fluoYellow .introLoaderBottom {
+ background-color: #dcff1b;
+}
+.theme-fluoYellow .doubleIntroLoaderProgBar {
+ background-color: #fff;
+}
+.theme-fluoYellow .doubleIntroLoaderProgBar span {
+ background-color: #67de0f;
+}
diff --git a/dist/css/introLoader.min.css b/dist/css/introLoader.min.css
index 22bc872..9422deb 100644
--- a/dist/css/introLoader.min.css
+++ b/dist/css/introLoader.min.css
@@ -1,5 +1,5 @@
/*
- * jQueryIntroLoader - v1.1.2
+ * jQueryIntroLoader - v1.2.0
* "simple intro loader animations"
* http://factory.brainleaf.eu/jqueryIntroLoader
*
@@ -10,4 +10,4 @@
* BugReport/Assistence: https://github.com/Gix075/jqueryIntroLoader/issues
*/
-.introLoader{position:fixed;top:0;right:0;bottom:0;left:0;overflow:hidden;background-color:#fff}.absolute.introLoader.simpleLoader{position:absolute}.theme-light.introLoader.simpleLoader{background-color:#fff}.theme-dark.introLoader.simpleLoader{background-color:#333}.theme-fluoGreen.introLoader.simpleLoader{background-color:#67de0f}.theme-fluoMagenta.introLoader.simpleLoader{background-color:#ff1bff}.theme-fluoYellow.introLoader.simpleLoader{background-color:#dcff1b}.theme-rasta.introLoader.simpleLoader{background:#1baa05;background:-moz-linear-gradient(top,rgba(27,170,5,1) 32%,rgba(242,230,7,1) 32%,rgba(242,230,7,1) 69%,rgba(242,230,7,1) 69%,rgba(252,23,7,1) 69%);background:-webkit-gradient(linear,left top,left bottom,color-stop(32%,rgba(27,170,5,1)),color-stop(32%,rgba(242,230,7,1)),color-stop(69%,rgba(242,230,7,1)),color-stop(69%,rgba(242,230,7,1)),color-stop(69%,rgba(252,23,7,1)));background:-webkit-linear-gradient(top,rgba(27,170,5,1) 32%,rgba(242,230,7,1) 32%,rgba(242,230,7,1) 69%,rgba(242,230,7,1) 69%,rgba(252,23,7,1) 69%);background:-o-linear-gradient(top,rgba(27,170,5,1) 32%,rgba(242,230,7,1) 32%,rgba(242,230,7,1) 69%,rgba(242,230,7,1) 69%,rgba(252,23,7,1) 69%);background:-ms-linear-gradient(top,rgba(27,170,5,1) 32%,rgba(242,230,7,1) 32%,rgba(242,230,7,1) 69%,rgba(242,230,7,1) 69%,rgba(252,23,7,1) 69%);background:linear-gradient(to bottom,rgba(27,170,5,1) 32%,rgba(242,230,7,1) 32%,rgba(242,230,7,1) 69%,rgba(242,230,7,1) 69%,rgba(252,23,7,1) 69%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#1baa05', endColorstr='#fc1707', GradientType=0)}
\ No newline at end of file
+.introLoader{position:fixed;top:0;right:0;bottom:0;left:0;overflow:hidden;background-color:#fff}.absolute.introLoader.simpleLoader{position:absolute}.theme-light.introLoader.simpleLoader{background-color:#fff}.theme-dark.introLoader.simpleLoader{background-color:#333}.theme-fluoGreen.introLoader.simpleLoader{background-color:#67de0f}.theme-fluoMagenta.introLoader.simpleLoader{background-color:#ff1bff}.theme-fluoYellow.introLoader.simpleLoader{background-color:#dcff1b}.theme-rasta.introLoader.simpleLoader{background:#1baa05;background:-moz-linear-gradient(top,rgba(27,170,5,1) 32%,rgba(242,230,7,1) 32%,rgba(242,230,7,1) 69%,rgba(242,230,7,1) 69%,rgba(252,23,7,1) 69%);background:-webkit-gradient(linear,left top,left bottom,color-stop(32%,rgba(27,170,5,1)),color-stop(32%,rgba(242,230,7,1)),color-stop(69%,rgba(242,230,7,1)),color-stop(69%,rgba(242,230,7,1)),color-stop(69%,rgba(252,23,7,1)));background:-webkit-linear-gradient(top,rgba(27,170,5,1) 32%,rgba(242,230,7,1) 32%,rgba(242,230,7,1) 69%,rgba(242,230,7,1) 69%,rgba(252,23,7,1) 69%);background:-o-linear-gradient(top,rgba(27,170,5,1) 32%,rgba(242,230,7,1) 32%,rgba(242,230,7,1) 69%,rgba(242,230,7,1) 69%,rgba(252,23,7,1) 69%);background:-ms-linear-gradient(top,rgba(27,170,5,1) 32%,rgba(242,230,7,1) 32%,rgba(242,230,7,1) 69%,rgba(242,230,7,1) 69%,rgba(252,23,7,1) 69%);background:linear-gradient(to bottom,rgba(27,170,5,1) 32%,rgba(242,230,7,1) 32%,rgba(242,230,7,1) 69%,rgba(242,230,7,1) 69%,rgba(252,23,7,1) 69%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#1baa05', endColorstr='#fc1707', GradientType=0)}.doubleIntroLoader{background:0 0!important}.introLoaderTop{position:absolute;top:0;right:0;left:0;height:50%;background-color:#333}.introLoaderBottom{position:absolute;right:0;bottom:0;left:0;height:50%;background-color:#333}.doubleIntroLoaderProgBar{position:absolute;top:50%;margin-top:-10px;width:100%;height:20px;background-color:#fff;z-index:9999999999999}.doubleIntroLoaderProgBar span{display:block;width:0;height:20px;background-color:#555}.theme-light .introLoaderBottom,.theme-light .introLoaderTop{background-color:#efefef}.theme-light .doubleIntroLoaderProgBar{background-color:#ccc}.theme-light .doubleIntroLoaderProgBar span{background-color:#555}.theme-dark .introLoaderBottom,.theme-dark .introLoaderTop{background-color:#333}.theme-dark .doubleIntroLoaderProgBar{background-color:#fff}.theme-dark .doubleIntroLoaderProgBar span{background-color:#555}.theme-fluoGreen .introLoaderBottom,.theme-fluoGreen .introLoaderTop{background-color:#67de0f}.theme-fluoGreen .doubleIntroLoaderProgBar{background-color:#fff}.theme-fluoGreen .doubleIntroLoaderProgBar span{background-color:#dcff1b}.theme-fluoMagenta .introLoaderBottom,.theme-fluoMagenta .introLoaderTop{background-color:#ff1bff}.theme-fluoMagenta .doubleIntroLoaderProgBar{background-color:#fff}.theme-fluoMagenta .doubleIntroLoaderProgBar span{background-color:#ccc}.theme-fluoYellow .introLoaderBottom,.theme-fluoYellow .introLoaderTop{background-color:#dcff1b}.theme-fluoYellow .doubleIntroLoaderProgBar{background-color:#fff}.theme-fluoYellow .doubleIntroLoaderProgBar span{background-color:#67de0f}
\ No newline at end of file
diff --git a/dist/jquery.introLoader.js b/dist/jquery.introLoader.js
index 01e6673..64395ad 100644
--- a/dist/jquery.introLoader.js
+++ b/dist/jquery.introLoader.js
@@ -1,5 +1,5 @@
/*
- * jQueryIntroLoader - v1.1.2
+ * jQueryIntroLoader - v1.2.0
* "simple intro loader animations"
* http://factory.brainleaf.eu/jqueryIntroLoader
*
@@ -23,14 +23,16 @@
effect:'fadeOut',
ease: "linear",
style: 'light',
- delayTime: 500, //delay time in milliseconds
+ delayTime: 500,
animationTime: 300,
+ progbarAnimationTime: 300,
+ progbarDelayAfter: 300,
fixed: true,
stop: true,
onAfter: function(){},
onBefore: function(){}
}
- },
+ },
spinJs: {}
@@ -75,14 +77,19 @@
var animOpt = plugin.settings.animation.options;
var spinOpt = plugin.settings.spinJs;
- plugin.spinner = new Spinner(spinOpt).spin();
+
// Choose Animation
switch(anim) {
case "simpleLoader":
+ plugin.spinner = new Spinner(spinOpt).spin();
simpleLoaderAnimation(element,animOpt,spinOpt);
break;
+ case "doubleLoader":
+ doubleLoaderAnimation(element,animOpt);
+ break;
default:
+ plugin.spinner = new Spinner(spinOpt).spin();
simpleLoaderAnimation(element,animOpt,spinOpt);
break;
}
@@ -102,16 +109,22 @@
case "simpleLoader":
simpleLoaderAnimationExit();
break;
+ case "doubleLoader":
+ doubleLoaderAnimationExit();
+ break;
}
}
+
/*
==================================================
PRIVATES
==================================================
*/
- // --> simpleLoaderAnimation
+
+ // ------------------------- simpleLoaderAnimation ----------------------------------
+
var simpleLoaderAnimation = function(element,animOpt,spinOpt) {
//console.log('simpleLoaderAnimation --> privateCalled '+plugin.settings.animation.options.effect);
@@ -224,7 +237,69 @@
}
+ // ----------------------------------------------------------------------------------
+
+
+ // ------------------------- doubleLoaderAnimation ----------------------------------
+
+ var doubleLoaderAnimation = function(element,animOpt) {
+ // onBefore function
+ animOpt.onBefore();
+
+ var styleClass = 'theme-'+ animOpt.style;
+ if (animOpt.fixed === false) {
+ $(element).addClass('absolute');
+ $(element).parent().css({'position':'relative','overflow':'hidden'});
+ }
+ $(element).addClass('introLoader doubleIntroLoader ' + styleClass);
+
+ var markup = '';
+ markup += '
';
+ markup += '
';
+ markup += '
';
+
+ $(element).html(markup);
+ $(element).show();
+
+ if (animOpt.stop === true) {
+ $(window).on('load', function() {
+ doubleLoaderAnimationExit();
+ });
+ }
+
+ }
+ var doubleLoaderAnimationExit = function() {
+
+ var animOpt = plugin.settings.animation.options;
+
+ setTimeout(function() {
+
+ $(element).find('.doubleIntroLoaderProgBar').find('span').animate(
+ {'width':'100%'},
+ animOpt.progbarAnimationTime,
+ animOpt.ease,
+ slidingDoorsVertical()
+ );
+
+ }, animOpt.delayTime ); // end Timeout
+
+ function slidingDoorsVertical() {
+ setTimeout(function() {
+ $(element).find('.doubleIntroLoaderProgBar').hide();
+ $(element).find('.introLoaderTop, .introLoaderBottom').animate(
+ {'height':0},
+ animOpt.animationTime,
+ animOpt.ease,
+ function() {
+ $(element).hide();
+ animOpt.onAfter(); // onAfter function
+ }
+ );
+ }, animOpt.progbarAnimationTime + animOpt.progbarDelayAfter ); // end Timeout
+ } // end slidingDoorsVertical()
+ }
+
plugin.init();
}
diff --git a/dist/jquery.introLoader.min.js b/dist/jquery.introLoader.min.js
index 4ba8921..9c63c84 100644
--- a/dist/jquery.introLoader.min.js
+++ b/dist/jquery.introLoader.min.js
@@ -1,5 +1,5 @@
/*
- * jQueryIntroLoader - v1.1.2
+ * jQueryIntroLoader - v1.2.0
* "simple intro loader animations"
* http://factory.brainleaf.eu/jqueryIntroLoader
*
@@ -9,4 +9,4 @@
*
* BugReport/Assistence: https://github.com/Gix075/jqueryIntroLoader/issues
*/
-!function(a){a.introLoader=function(b,c){var d={animation:{name:"simpleLoader",options:{effect:"fadeOut",ease:"linear",style:"light",delayTime:500,animationTime:300,fixed:!0,stop:!0,onAfter:function(){},onBefore:function(){}}},spinJs:{}},e=this;e.settings={};var b=(a(b),b);e.init=function(){e.settings=a.extend(!0,d,c);var g={lines:this.settings.spinJs.lines,length:this.settings.spinJs.length,width:this.settings.spinJs.width,radius:this.settings.spinJs.radius,corners:this.settings.spinJs.corners,rotate:this.settings.spinJs.rotate,direction:this.settings.spinJs.direction,color:this.settings.spinJs.color,speed:this.settings.spinJs.speed,trail:this.settings.spinJs.trail,shadow:this.settings.spinJs.shadow,hwaccel:this.settings.spinJs.hwaccel,className:this.settings.spinJs.className,zIndex:this.settings.spinJs.zIndex,top:this.settings.spinJs.top,left:this.settings.spinJs.left},h=e.settings.animation.name,i=e.settings.animation.options,g=e.settings.spinJs;switch(e.spinner=new Spinner(g).spin(),h){case"simpleLoader":f(b,i,g);break;default:f(b,i,g)}},e.stop=function(){switch(e.settings.animation.name){case"simpleLoader":g()}};var f=function(b,c){c.onBefore();var d="theme-"+c.style;c.fixed===!1&&(a(b).addClass("absolute"),a(b).parent().css({position:"relative",overflow:"hidden"})),a(b).addClass("introLoader simpleLoader "+d);var f="";f+='',f+="
",a(b).html(f),a(b).show();var h=document.getElementById("introLoaderSpinner");e.spinner.spin(h),c.stop===!0&&a(window).on("load",function(){g()})},g=function(){var c=e.settings.animation.options;setTimeout(function(){switch(c.effect){case"fadeOut":a(b).fadeOut(c.animationTime,c.ease,function(){a("#introLoaderSpinner").remove(),c.onAfter()});break;case"slideUp":e.spinner.stop(),a(b).animate({bottom:a(window).height()},c.animationTime,c.ease,function(){a(b).hide(),a("#introLoaderSpinner").remove(),c.onAfter()});break;case"slideDown":e.spinner.stop(),a(b).animate({top:a(window).height()},c.animationTime,c.ease,function(){a(b).hide(),a("#introLoaderSpinner").remove(),c.onAfter()});break;case"slideLeft":e.spinner.stop(),a(b).animate({right:a(window).width(),left:"-100%"},c.animationTime,c.ease,function(){a(b).hide(),a("#introLoaderSpinner").remove(),c.onAfter()});break;case"slideRight":e.spinner.stop(),a(b).animate({left:a(window).width(),right:"-100%"},c.animationTime,c.ease,function(){a(b).hide(),a("#introLoaderSpinner").remove(),c.onAfter()});break;default:a(b).hide()}},c.delayTime)};e.init()},a.fn.introLoader=function(b){return this.each(function(){if(void 0==a(this).data("introLoader")){var c=new a.introLoader(this,b);a(this).data("introLoader",c)}else{a(this).removeData("introLoader");var c=new a.introLoader(this,b);a(this).data("introLoader",c)}})}}(jQuery);
\ No newline at end of file
+!function(a){a.introLoader=function(b,c){var d={animation:{name:"simpleLoader",options:{effect:"fadeOut",ease:"linear",style:"light",delayTime:500,animationTime:300,progbarAnimationTime:300,progbarDelayAfter:300,fixed:!0,stop:!0,onAfter:function(){},onBefore:function(){}}},spinJs:{}},e=this;e.settings={};var b=(a(b),b);e.init=function(){e.settings=a.extend(!0,d,c);var g={lines:this.settings.spinJs.lines,length:this.settings.spinJs.length,width:this.settings.spinJs.width,radius:this.settings.spinJs.radius,corners:this.settings.spinJs.corners,rotate:this.settings.spinJs.rotate,direction:this.settings.spinJs.direction,color:this.settings.spinJs.color,speed:this.settings.spinJs.speed,trail:this.settings.spinJs.trail,shadow:this.settings.spinJs.shadow,hwaccel:this.settings.spinJs.hwaccel,className:this.settings.spinJs.className,zIndex:this.settings.spinJs.zIndex,top:this.settings.spinJs.top,left:this.settings.spinJs.left},i=e.settings.animation.name,j=e.settings.animation.options,g=e.settings.spinJs;switch(i){case"simpleLoader":e.spinner=new Spinner(g).spin(),f(b,j,g);break;case"doubleLoader":h(b,j);break;default:e.spinner=new Spinner(g).spin(),f(b,j,g)}},e.stop=function(){switch(e.settings.animation.name){case"simpleLoader":g();break;case"doubleLoader":i()}};var f=function(b,c){c.onBefore();var d="theme-"+c.style;c.fixed===!1&&(a(b).addClass("absolute"),a(b).parent().css({position:"relative",overflow:"hidden"})),a(b).addClass("introLoader simpleLoader "+d);var f="";f+='',f+="
",a(b).html(f),a(b).show();var h=document.getElementById("introLoaderSpinner");e.spinner.spin(h),c.stop===!0&&a(window).on("load",function(){g()})},g=function(){var c=e.settings.animation.options;setTimeout(function(){switch(c.effect){case"fadeOut":a(b).fadeOut(c.animationTime,c.ease,function(){a("#introLoaderSpinner").remove(),c.onAfter()});break;case"slideUp":e.spinner.stop(),a(b).animate({bottom:a(window).height()},c.animationTime,c.ease,function(){a(b).hide(),a("#introLoaderSpinner").remove(),c.onAfter()});break;case"slideDown":e.spinner.stop(),a(b).animate({top:a(window).height()},c.animationTime,c.ease,function(){a(b).hide(),a("#introLoaderSpinner").remove(),c.onAfter()});break;case"slideLeft":e.spinner.stop(),a(b).animate({right:a(window).width(),left:"-100%"},c.animationTime,c.ease,function(){a(b).hide(),a("#introLoaderSpinner").remove(),c.onAfter()});break;case"slideRight":e.spinner.stop(),a(b).animate({left:a(window).width(),right:"-100%"},c.animationTime,c.ease,function(){a(b).hide(),a("#introLoaderSpinner").remove(),c.onAfter()});break;default:a(b).hide()}},c.delayTime)},h=function(b,c){c.onBefore();var d="theme-"+c.style;c.fixed===!1&&(a(b).addClass("absolute"),a(b).parent().css({position:"relative",overflow:"hidden"})),a(b).addClass("introLoader doubleIntroLoader "+d);var e="";e+='
',e+='
',e+='
',a(b).html(e),a(b).show(),c.stop===!0&&a(window).on("load",function(){i()})},i=function(){function c(){setTimeout(function(){a(b).find(".doubleIntroLoaderProgBar").hide(),a(b).find(".introLoaderTop, .introLoaderBottom").animate({height:0},d.animationTime,d.ease,function(){a(b).hide(),d.onAfter()})},d.progbarAnimationTime+d.progbarDelayAfter)}var d=e.settings.animation.options;setTimeout(function(){a(b).find(".doubleIntroLoaderProgBar").find("span").animate({width:"100%"},d.progbarAnimationTime,d.ease,c())},d.delayTime)};e.init()},a.fn.introLoader=function(b){return this.each(function(){if(void 0==a(this).data("introLoader")){var c=new a.introLoader(this,b);a(this).data("introLoader",c)}else{a(this).removeData("introLoader");var c=new a.introLoader(this,b);a(this).data("introLoader",c)}})}}(jQuery);
\ No newline at end of file
diff --git a/dist/jquery.introLoader.pack.min.js b/dist/jquery.introLoader.pack.min.js
index 6126f54..b104093 100644
--- a/dist/jquery.introLoader.pack.min.js
+++ b/dist/jquery.introLoader.pack.min.js
@@ -1,5 +1,5 @@
/*
- * jQueryIntroLoader - v1.1.2
+ * jQueryIntroLoader - v1.2.0
* "simple intro loader animations"
* http://factory.brainleaf.eu/jqueryIntroLoader
*
@@ -9,4 +9,4 @@
*
* BugReport/Assistence: https://github.com/Gix075/jqueryIntroLoader/issues
*/
-!function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return l[e]||(m.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",m.cssRules.length),l[e]=1),e}function d(a,b){var c,d,e=a.style;for(b=b.charAt(0).toUpperCase()+b.slice(1),d=0;d',c)}m.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.width,left:d.radius,top:-d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.length+d.width,k=2*j,l=2*-(d.width+d.length)+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;kb?-.5*h*Math.pow(2,10*(b-=1))*Math.sin(2*(b*e-f)*Math.PI/g)+c:h*Math.pow(2,-10*(b-=1))*Math.sin(2*(b*e-f)*Math.PI/g)*.5+d+c},easeInBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),d*(b/=e)*b*((f+1)*b-f)+c},easeOutBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),d*((b=b/e-1)*b*((f+1)*b+f)+1)+c},easeInOutBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),(b/=e/2)<1?d/2*b*b*(((f*=1.525)+1)*b-f)+c:d/2*((b-=2)*b*(((f*=1.525)+1)*b+f)+2)+c},easeInBounce:function(a,b,c,d,e){return d-jQuery.easing.easeOutBounce(a,e-b,0,d,e)+c},easeOutBounce:function(a,b,c,d,e){return(b/=e)<1/2.75?7.5625*d*b*b+c:2/2.75>b?d*(7.5625*(b-=1.5/2.75)*b+.75)+c:2.5/2.75>b?d*(7.5625*(b-=2.25/2.75)*b+.9375)+c:d*(7.5625*(b-=2.625/2.75)*b+.984375)+c},easeInOutBounce:function(a,b,c,d,e){return e/2>b?.5*jQuery.easing.easeInBounce(a,2*b,0,d,e)+c:.5*jQuery.easing.easeOutBounce(a,2*b-e,0,d,e)+.5*d+c}}),function(a){a.introLoader=function(b,c){var d={animation:{name:"simpleLoader",options:{effect:"fadeOut",ease:"linear",style:"light",delayTime:500,animationTime:300,fixed:!0,stop:!0,onAfter:function(){},onBefore:function(){}}},spinJs:{}},e=this;e.settings={};var b=(a(b),b);e.init=function(){e.settings=a.extend(!0,d,c);var g={lines:this.settings.spinJs.lines,length:this.settings.spinJs.length,width:this.settings.spinJs.width,radius:this.settings.spinJs.radius,corners:this.settings.spinJs.corners,rotate:this.settings.spinJs.rotate,direction:this.settings.spinJs.direction,color:this.settings.spinJs.color,speed:this.settings.spinJs.speed,trail:this.settings.spinJs.trail,shadow:this.settings.spinJs.shadow,hwaccel:this.settings.spinJs.hwaccel,className:this.settings.spinJs.className,zIndex:this.settings.spinJs.zIndex,top:this.settings.spinJs.top,left:this.settings.spinJs.left},h=e.settings.animation.name,i=e.settings.animation.options,g=e.settings.spinJs;switch(e.spinner=new Spinner(g).spin(),h){case"simpleLoader":f(b,i,g);break;default:f(b,i,g)}},e.stop=function(){switch(e.settings.animation.name){case"simpleLoader":g()}};var f=function(b,c){c.onBefore();var d="theme-"+c.style;c.fixed===!1&&(a(b).addClass("absolute"),a(b).parent().css({position:"relative",overflow:"hidden"})),a(b).addClass("introLoader simpleLoader "+d);var f="";f+='',f+="
",a(b).html(f),a(b).show();var h=document.getElementById("introLoaderSpinner");e.spinner.spin(h),c.stop===!0&&a(window).on("load",function(){g()})},g=function(){var c=e.settings.animation.options;setTimeout(function(){switch(c.effect){case"fadeOut":a(b).fadeOut(c.animationTime,c.ease,function(){a("#introLoaderSpinner").remove(),c.onAfter()});break;case"slideUp":e.spinner.stop(),a(b).animate({bottom:a(window).height()},c.animationTime,c.ease,function(){a(b).hide(),a("#introLoaderSpinner").remove(),c.onAfter()});break;case"slideDown":e.spinner.stop(),a(b).animate({top:a(window).height()},c.animationTime,c.ease,function(){a(b).hide(),a("#introLoaderSpinner").remove(),c.onAfter()});break;case"slideLeft":e.spinner.stop(),a(b).animate({right:a(window).width(),left:"-100%"},c.animationTime,c.ease,function(){a(b).hide(),a("#introLoaderSpinner").remove(),c.onAfter()});break;case"slideRight":e.spinner.stop(),a(b).animate({left:a(window).width(),right:"-100%"},c.animationTime,c.ease,function(){a(b).hide(),a("#introLoaderSpinner").remove(),c.onAfter()});break;default:a(b).hide()}},c.delayTime)};e.init()},a.fn.introLoader=function(b){return this.each(function(){if(void 0==a(this).data("introLoader")){var c=new a.introLoader(this,b);a(this).data("introLoader",c)}else{a(this).removeData("introLoader");var c=new a.introLoader(this,b);a(this).data("introLoader",c)}})}}(jQuery);
\ No newline at end of file
+!function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return l[e]||(m.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",m.cssRules.length),l[e]=1),e}function d(a,b){var c,d,e=a.style;for(b=b.charAt(0).toUpperCase()+b.slice(1),d=0;d',c)}m.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.width,left:d.radius,top:-d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.length+d.width,k=2*j,l=2*-(d.width+d.length)+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;kb?-.5*h*Math.pow(2,10*(b-=1))*Math.sin(2*(b*e-f)*Math.PI/g)+c:h*Math.pow(2,-10*(b-=1))*Math.sin(2*(b*e-f)*Math.PI/g)*.5+d+c},easeInBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),d*(b/=e)*b*((f+1)*b-f)+c},easeOutBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),d*((b=b/e-1)*b*((f+1)*b+f)+1)+c},easeInOutBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),(b/=e/2)<1?d/2*b*b*(((f*=1.525)+1)*b-f)+c:d/2*((b-=2)*b*(((f*=1.525)+1)*b+f)+2)+c},easeInBounce:function(a,b,c,d,e){return d-jQuery.easing.easeOutBounce(a,e-b,0,d,e)+c},easeOutBounce:function(a,b,c,d,e){return(b/=e)<1/2.75?7.5625*d*b*b+c:2/2.75>b?d*(7.5625*(b-=1.5/2.75)*b+.75)+c:2.5/2.75>b?d*(7.5625*(b-=2.25/2.75)*b+.9375)+c:d*(7.5625*(b-=2.625/2.75)*b+.984375)+c},easeInOutBounce:function(a,b,c,d,e){return e/2>b?.5*jQuery.easing.easeInBounce(a,2*b,0,d,e)+c:.5*jQuery.easing.easeOutBounce(a,2*b-e,0,d,e)+.5*d+c}}),function(a){a.introLoader=function(b,c){var d={animation:{name:"simpleLoader",options:{effect:"fadeOut",ease:"linear",style:"light",delayTime:500,animationTime:300,progbarAnimationTime:300,progbarDelayAfter:300,fixed:!0,stop:!0,onAfter:function(){},onBefore:function(){}}},spinJs:{}},e=this;e.settings={};var b=(a(b),b);e.init=function(){e.settings=a.extend(!0,d,c);var g={lines:this.settings.spinJs.lines,length:this.settings.spinJs.length,width:this.settings.spinJs.width,radius:this.settings.spinJs.radius,corners:this.settings.spinJs.corners,rotate:this.settings.spinJs.rotate,direction:this.settings.spinJs.direction,color:this.settings.spinJs.color,speed:this.settings.spinJs.speed,trail:this.settings.spinJs.trail,shadow:this.settings.spinJs.shadow,hwaccel:this.settings.spinJs.hwaccel,className:this.settings.spinJs.className,zIndex:this.settings.spinJs.zIndex,top:this.settings.spinJs.top,left:this.settings.spinJs.left},i=e.settings.animation.name,j=e.settings.animation.options,g=e.settings.spinJs;switch(i){case"simpleLoader":e.spinner=new Spinner(g).spin(),f(b,j,g);break;case"doubleLoader":h(b,j);break;default:e.spinner=new Spinner(g).spin(),f(b,j,g)}},e.stop=function(){switch(e.settings.animation.name){case"simpleLoader":g();break;case"doubleLoader":i()}};var f=function(b,c){c.onBefore();var d="theme-"+c.style;c.fixed===!1&&(a(b).addClass("absolute"),a(b).parent().css({position:"relative",overflow:"hidden"})),a(b).addClass("introLoader simpleLoader "+d);var f="";f+='',f+="
",a(b).html(f),a(b).show();var h=document.getElementById("introLoaderSpinner");e.spinner.spin(h),c.stop===!0&&a(window).on("load",function(){g()})},g=function(){var c=e.settings.animation.options;setTimeout(function(){switch(c.effect){case"fadeOut":a(b).fadeOut(c.animationTime,c.ease,function(){a("#introLoaderSpinner").remove(),c.onAfter()});break;case"slideUp":e.spinner.stop(),a(b).animate({bottom:a(window).height()},c.animationTime,c.ease,function(){a(b).hide(),a("#introLoaderSpinner").remove(),c.onAfter()});break;case"slideDown":e.spinner.stop(),a(b).animate({top:a(window).height()},c.animationTime,c.ease,function(){a(b).hide(),a("#introLoaderSpinner").remove(),c.onAfter()});break;case"slideLeft":e.spinner.stop(),a(b).animate({right:a(window).width(),left:"-100%"},c.animationTime,c.ease,function(){a(b).hide(),a("#introLoaderSpinner").remove(),c.onAfter()});break;case"slideRight":e.spinner.stop(),a(b).animate({left:a(window).width(),right:"-100%"},c.animationTime,c.ease,function(){a(b).hide(),a("#introLoaderSpinner").remove(),c.onAfter()});break;default:a(b).hide()}},c.delayTime)},h=function(b,c){c.onBefore();var d="theme-"+c.style;c.fixed===!1&&(a(b).addClass("absolute"),a(b).parent().css({position:"relative",overflow:"hidden"})),a(b).addClass("introLoader doubleIntroLoader "+d);var e="";e+='
',e+='
',e+='
',a(b).html(e),a(b).show(),c.stop===!0&&a(window).on("load",function(){i()})},i=function(){function c(){setTimeout(function(){a(b).find(".doubleIntroLoaderProgBar").hide(),a(b).find(".introLoaderTop, .introLoaderBottom").animate({height:0},d.animationTime,d.ease,function(){a(b).hide(),d.onAfter()})},d.progbarAnimationTime+d.progbarDelayAfter)}var d=e.settings.animation.options;setTimeout(function(){a(b).find(".doubleIntroLoaderProgBar").find("span").animate({width:"100%"},d.progbarAnimationTime,d.ease,c())},d.delayTime)};e.init()},a.fn.introLoader=function(b){return this.each(function(){if(void 0==a(this).data("introLoader")){var c=new a.introLoader(this,b);a(this).data("introLoader",c)}else{a(this).removeData("introLoader");var c=new a.introLoader(this,b);a(this).data("introLoader",c)}})}}(jQuery);
\ No newline at end of file