vendor/assets/javascripts/animation.js in flashgrid-3.3.2 vs vendor/assets/javascripts/animation.js in flashgrid-3.4.0

- old
+ new

@@ -1,42 +1,45 @@ (function ($, window, document, undefined) { 'use strict'; $.fn.animateCSS = function (effect, delay, callback) { return this.each(function () { - var $this = $(this), + + var $this = $(this), + animated = "animated", + hidden = "hidden", transitionEnd = "webkitAnimationEnd oanimationend msAnimationEnd animationend", - animated = "animated", - visibility = "visibility", - visible = "visible", - hidden = "hidden"; + visibility = "visibility", + visible = "visible"; function run() { - $this.addClass( animated + " " + effect); + $this.addClass( animated + " " + effect) if ($this.css( visibility ) === hidden) { - $this.css( visibility, visible); - }; + $this.css( visibility, visible) + } if ($this.is(":" + hidden)) { - $this.show(); - }; + $this.show() + } $this.bind( transitionEnd, function () { - $this.removeClass(animated + " " + effect); + $this.removeClass(animated + " " + effect) if (typeof callback === "function") { - callback.call(this); - $this.unbind( transitionEnd ); - }; - }); - }; + callback.call(this) + $this.unbind( transitionEnd ) + } + }) + } if (!delay || typeof delay === "function") { callback = delay; - run(); + run() } else { - setTimeout( run, delay ); - }; - }); - }; + setTimeout(run, delay) + } + + }) + } + })(jQuery, window, document); \ No newline at end of file