Last active
November 9, 2017 03:31
-
-
Save aichholzer/fe7b2f1d24254a7ebee05cd3dc12d483 to your computer and use it in GitHub Desktop.
Revisions
-
aichholzer revised this gist
Nov 9, 2017 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ /** * Element fadeIn plugin for jQuery. * @author Stefan Aichholzer <https://github.com/aichholzer> * @param options -Object defining the animation's end result. * * { -
aichholzer created this gist
Nov 9, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ /** * Element fadeIn plugin for jQuery. * @param options -Object defining the animation's end result. * * { * opacity: 1, * marginBottom: 5, * duration: 50 * } */ (function ($) { $.fn.animator = function animator(options = null) { if (!options) { return this; } this.toArray() .map(item => () => $(item).animate(options, options.duration).promise()) .reduce((current, next) => current.then(next), $().promise()); }; }(jQuery));