Fixed minor issue in jquery.gsap.js plugin that could prevent fadeIn() from working after fadeOut()

This commit is contained in:
Jack Doyle
2013-01-25 20:07:55 -06:00
parent cf1ce5f5ab
commit a0ef02ea1d
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
/*!
* VERSION: 0.1.2
* VERSION: 0.1.3
* DATE: 2013-01-25
* JavaScript
* UPDATES AND DOCS AT: http://www.greensock.com/jquery-gsap-plugin/
@@ -14,4 +14,4 @@
*
* @author: Jack Doyle, jack@greensock.com
*/
(function(a){"use strict";var e,f,g,b=a.fn.animate,c=a.fn.stop,d=!0,h=function(a,b){"function"==typeof a&&this.each(a),b()},i=function(a,b,c,d,e){e="function"==typeof e?e:null,b="function"==typeof b?b:null,(b||e)&&(d[a]=e?h:c.each,d[a+"Scope"]=c,d[a+"Params"]=e?[b,e]:[b])},j={overwrite:1,delay:1,useFrames:1,runBackwards:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,autoCSS:1},k=function(a,b){for(var c in j)j[c]&&void 0!==a[c]&&(b[c]=a[c])},l=function(a){return function(b){return a.getRatio(b)}},m={},n=function(){var c,d,b=window.GreenSockGlobals||window;if(e=b.TweenMax||b.TweenLite,f=b.CSSPlugin,e&&(c=(e.version+".0.0").split("."),d=!(Number(c[0])>0&&Number(c[1])>7)),!e||!f||d)return e=null,!g&&window.console&&(window.console.log("The jquery.gsap.js plugin requires the TweenMax (or at least TweenLite and CSSPlugin) JavaScript file(s)."+(d?" Version "+c.join(".")+" is too old.":"")),g=!0),void 0;if(m=b.Ease.map,m&&a.easing){for(var h in m)a.easing[h]=l(m[h]);n=!1}};a.fn.animate=function(c,g,h,j){if(c=c||{},n&&(n(),!e||!f))return b.call(this,c,g,h,j);if(!d||c.skipGSAP===!0||"object"==typeof g&&"function"==typeof g.step)return b.call(this,c,g,h,j);var r,s,t,u,v,l=a.speed(g,h,j),o={ease:m[l.easing]||(l.easing===!1?m.linear:m.swing)},p=this,q="object"==typeof g?g.specialEasing:null;for(t in c)s=c[t],s instanceof Array&&m[s[1]]&&(q=q||{},q[t]=s[1],s=s[0]),"toggle"===s||"hide"===s||"show"===s?(r=r||{},r[t]=s):o[-1===t.indexOf("-")?t:a.camelCase(t)]=s;if(q){v=[];for(t in q)s=v[v.length]={},k(o,s),s.ease=m[q[t]]||o.ease,-1!==t.indexOf("-")&&(t=a.camelCase(t)),s[t]=o[t];0===v.length&&(v=null)}return u=function(c){if(i("onComplete",l.old,p,o,c),v)for(var d=v.length;--d>-1;)e.to(p,a.fx.off?0:l.duration/1e3,v[d]);e.to(p,a.fx.off?0:l.duration/1e3,o),r&&b.call(p,r,{duration:l.duration,easing:l.easing,queue:!1})},l.queue!==!1?p.queue(l.queue,u):u(),p},a.fn.stop=function(a,b){if(c.call(this,a,b),e){if(b)for(var g,d=e.getTweensOf(this),f=d.length;--f>-1;)g=d[f].totalTime()/d[f].totalDuration(),g>0&&1>g&&d[f].seek(d[f].totalDuration());e.killTweensOf(this)}return this},a.gsap={enabled:function(a){d=a},version:"0.1.2"}})(jQuery);
(function(a){"use strict";var e,f,g,b=a.fn.animate,c=a.fn.stop,d=!0,h=function(a,b){"function"==typeof a&&this.each(a),b()},i=function(a,b,c,d,e){e="function"==typeof e?e:null,b="function"==typeof b?b:null,(b||e)&&(d[a]=e?h:c.each,d[a+"Scope"]=c,d[a+"Params"]=e?[b,e]:[b])},j={overwrite:1,delay:1,useFrames:1,runBackwards:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,autoCSS:1},k=function(a,b){for(var c in j)j[c]&&void 0!==a[c]&&(b[c]=a[c])},l=function(a){return function(b){return a.getRatio(b)}},m={},n=function(){var c,d,b=window.GreenSockGlobals||window;if(e=b.TweenMax||b.TweenLite,f=b.CSSPlugin,e&&(c=(e.version+".0.0").split("."),d=!(Number(c[0])>0&&Number(c[1])>7)),!e||!f||d)return e=null,!g&&window.console&&(window.console.log("The jquery.gsap.js plugin requires the TweenMax (or at least TweenLite and CSSPlugin) JavaScript file(s)."+(d?" Version "+c.join(".")+" is too old.":"")),g=!0),void 0;if(m=b.Ease.map,m&&a.easing){for(var h in m)a.easing[h]=l(m[h]);n=!1}};a.fn.animate=function(c,g,h,j){if(c=c||{},n&&(n(),!e||!f))return b.call(this,c,g,h,j);if(!d||c.skipGSAP===!0||"object"==typeof g&&"function"==typeof g.step)return b.call(this,c,g,h,j);var r,s,t,u,v,l=a.speed(g,h,j),o={ease:m[l.easing]||(l.easing===!1?m.linear:m.swing)},p=this,q="object"==typeof g?g.specialEasing:null;for(t in c)s=c[t],s instanceof Array&&m[s[1]]&&(q=q||{},q[t]=s[1],s=s[0]),"toggle"===s||"hide"===s||"show"===s?(r=r||{},r[t]=s):o[-1===t.indexOf("-")?t:a.camelCase(t)]=s;if(q){v=[];for(t in q)s=v[v.length]={},k(o,s),s.ease=m[q[t]]||o.ease,-1!==t.indexOf("-")&&(t=a.camelCase(t)),s[t]=o[t];0===v.length&&(v=null)}return u=function(c){if(r&&b.call(p,r,{duration:l.duration,easing:l.easing,queue:!1}),v)for(var d=v.length;--d>-1;)e.to(p,a.fx.off?0:l.duration/1e3,v[d]);i("onComplete",l.old,p,o,c),e.to(p,a.fx.off?0:l.duration/1e3,o)},l.queue!==!1?p.queue(l.queue,u):u(),p},a.fn.stop=function(a,b){if(c.call(this,a,b),e){if(b)for(var g,d=e.getTweensOf(this),f=d.length;--f>-1;)g=d[f].totalTime()/d[f].totalDuration(),g>0&&1>g&&d[f].seek(d[f].totalDuration());e.killTweensOf(this)}return this},a.gsap={enabled:function(a){d=a},version:"0.1.3"}})(jQuery);
+2 -2
View File
@@ -1,5 +1,5 @@
/*!
* VERSION: 0.1.2
* VERSION: 0.1.3
* DATE: 2013-01-25
* JavaScript
* UPDATES AND DOCS AT: http://www.greensock.com/jquery-gsap-plugin/
@@ -14,4 +14,4 @@
*
* @author: Jack Doyle, jack@greensock.com
*/
(function(a){"use strict";var e,f,g,b=a.fn.animate,c=a.fn.stop,d=!0,h=function(a,b){"function"==typeof a&&this.each(a),b()},i=function(a,b,c,d,e){e="function"==typeof e?e:null,b="function"==typeof b?b:null,(b||e)&&(d[a]=e?h:c.each,d[a+"Scope"]=c,d[a+"Params"]=e?[b,e]:[b])},j={overwrite:1,delay:1,useFrames:1,runBackwards:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,autoCSS:1},k=function(a,b){for(var c in j)j[c]&&void 0!==a[c]&&(b[c]=a[c])},l=function(a){return function(b){return a.getRatio(b)}},m={},n=function(){var c,d,b=window.GreenSockGlobals||window;if(e=b.TweenMax||b.TweenLite,f=b.CSSPlugin,e&&(c=(e.version+".0.0").split("."),d=!(Number(c[0])>0&&Number(c[1])>7)),!e||!f||d)return e=null,!g&&window.console&&(window.console.log("The jquery.gsap.js plugin requires the TweenMax (or at least TweenLite and CSSPlugin) JavaScript file(s)."+(d?" Version "+c.join(".")+" is too old.":"")),g=!0),void 0;if(m=b.Ease.map,m&&a.easing){for(var h in m)a.easing[h]=l(m[h]);n=!1}};a.fn.animate=function(c,g,h,j){if(c=c||{},n&&(n(),!e||!f))return b.call(this,c,g,h,j);if(!d||c.skipGSAP===!0||"object"==typeof g&&"function"==typeof g.step)return b.call(this,c,g,h,j);var r,s,t,u,v,l=a.speed(g,h,j),o={ease:m[l.easing]||(l.easing===!1?m.linear:m.swing)},p=this,q="object"==typeof g?g.specialEasing:null;for(t in c)s=c[t],s instanceof Array&&m[s[1]]&&(q=q||{},q[t]=s[1],s=s[0]),"toggle"===s||"hide"===s||"show"===s?(r=r||{},r[t]=s):o[-1===t.indexOf("-")?t:a.camelCase(t)]=s;if(q){v=[];for(t in q)s=v[v.length]={},k(o,s),s.ease=m[q[t]]||o.ease,-1!==t.indexOf("-")&&(t=a.camelCase(t)),s[t]=o[t];0===v.length&&(v=null)}return u=function(c){if(i("onComplete",l.old,p,o,c),v)for(var d=v.length;--d>-1;)e.to(p,a.fx.off?0:l.duration/1e3,v[d]);e.to(p,a.fx.off?0:l.duration/1e3,o),r&&b.call(p,r,{duration:l.duration,easing:l.easing,queue:!1})},l.queue!==!1?p.queue(l.queue,u):u(),p},a.fn.stop=function(a,b){if(c.call(this,a,b),e){if(b)for(var g,d=e.getTweensOf(this),f=d.length;--f>-1;)g=d[f].totalTime()/d[f].totalDuration(),g>0&&1>g&&d[f].seek(d[f].totalDuration());e.killTweensOf(this)}return this},a.gsap={enabled:function(a){d=a},version:"0.1.2"}})(jQuery);
(function(a){"use strict";var e,f,g,b=a.fn.animate,c=a.fn.stop,d=!0,h=function(a,b){"function"==typeof a&&this.each(a),b()},i=function(a,b,c,d,e){e="function"==typeof e?e:null,b="function"==typeof b?b:null,(b||e)&&(d[a]=e?h:c.each,d[a+"Scope"]=c,d[a+"Params"]=e?[b,e]:[b])},j={overwrite:1,delay:1,useFrames:1,runBackwards:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,autoCSS:1},k=function(a,b){for(var c in j)j[c]&&void 0!==a[c]&&(b[c]=a[c])},l=function(a){return function(b){return a.getRatio(b)}},m={},n=function(){var c,d,b=window.GreenSockGlobals||window;if(e=b.TweenMax||b.TweenLite,f=b.CSSPlugin,e&&(c=(e.version+".0.0").split("."),d=!(Number(c[0])>0&&Number(c[1])>7)),!e||!f||d)return e=null,!g&&window.console&&(window.console.log("The jquery.gsap.js plugin requires the TweenMax (or at least TweenLite and CSSPlugin) JavaScript file(s)."+(d?" Version "+c.join(".")+" is too old.":"")),g=!0),void 0;if(m=b.Ease.map,m&&a.easing){for(var h in m)a.easing[h]=l(m[h]);n=!1}};a.fn.animate=function(c,g,h,j){if(c=c||{},n&&(n(),!e||!f))return b.call(this,c,g,h,j);if(!d||c.skipGSAP===!0||"object"==typeof g&&"function"==typeof g.step)return b.call(this,c,g,h,j);var r,s,t,u,v,l=a.speed(g,h,j),o={ease:m[l.easing]||(l.easing===!1?m.linear:m.swing)},p=this,q="object"==typeof g?g.specialEasing:null;for(t in c)s=c[t],s instanceof Array&&m[s[1]]&&(q=q||{},q[t]=s[1],s=s[0]),"toggle"===s||"hide"===s||"show"===s?(r=r||{},r[t]=s):o[-1===t.indexOf("-")?t:a.camelCase(t)]=s;if(q){v=[];for(t in q)s=v[v.length]={},k(o,s),s.ease=m[q[t]]||o.ease,-1!==t.indexOf("-")&&(t=a.camelCase(t)),s[t]=o[t];0===v.length&&(v=null)}return u=function(c){if(r&&b.call(p,r,{duration:l.duration,easing:l.easing,queue:!1}),v)for(var d=v.length;--d>-1;)e.to(p,a.fx.off?0:l.duration/1e3,v[d]);i("onComplete",l.old,p,o,c),e.to(p,a.fx.off?0:l.duration/1e3,o)},l.queue!==!1?p.queue(l.queue,u):u(),p},a.fn.stop=function(a,b){if(c.call(this,a,b),e){if(b)for(var g,d=e.getTweensOf(this),f=d.length;--f>-1;)g=d[f].totalTime()/d[f].totalDuration(),g>0&&1>g&&d[f].seek(d[f].totalDuration());e.killTweensOf(this)}return this},a.gsap={enabled:function(a){d=a},version:"0.1.3"}})(jQuery);