vendor/assets/javascripts/_animation.js in active_frontend-12.2.0 vs vendor/assets/javascripts/_animation.js in active_frontend-12.3.0

- old
+ new

@@ -7,11 +7,11 @@ var Animation = function (element, options) { this.options = $.extend({}, options) this.$element = $(element) }; - Animation.VERSION = '3.3.2' + Animation.VERSION = '3.3.6' Animation.TRANSITION_END = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend' $.fn.extend({ animation: function(effect, options) { @@ -33,11 +33,11 @@ }; animation = function(element) { if (settings.infinite === true) { settings.klass += ' infinite'; - } + }; setDelay(element); setDuration(element); unhide(element); addClass(element); @@ -49,44 +49,44 @@ }; unhide = function(element) { if (element.css('visibility') === 'hidden') { element.css('visibility', 'visible'); - } + }; if (element.is(':hidden')) { return element.show(); - } + }; }; removeClass = function(element) { return element.removeClass(settings.klass + settings.effect); }; setDelay = function(element) { return element.css({ - '-webkit-animation-delay': settings.delay, - '-moz-animation-delay': settings.delay, - '-o-animation-delay': settings.delay, - 'animation-delay': settings.delay + '-webkit-animation-delay' : settings.delay, + '-moz-animation-delay' : settings.delay, + '-o-animation-delay' : settings.delay, + 'animation-delay' : settings.delay }); }; setDuration = function(element) { return element.css({ - '-webkit-animation-duration': settings.duration, - '-moz-animation-duration': settings.duration, - '-o-animation-duration': settings.duration, - 'animation-duration': settings.duration + '-webkit-animation-duration' : settings.duration, + '-moz-animation-duration' : settings.duration, + '-o-animation-duration' : settings.duration, + 'animation-duration' : settings.duration }); }; callback = function(element) { if (settings.infinite === false) { removeClass(element); - } + }; if (typeof settings.callback === 'function') { return settings.callback.call(element); - } + }; }; complete = function(element) { return element.one(Animation.TRANSITION_END, function() { return callback(element); \ No newline at end of file