Files
sx-fc/app/assets/javascripts/BSBMaterial/pages/ui/animations.js
2017-10-23 11:38:10 +06:30

16 lines
563 B
JavaScript
Executable File

$(function () {
$('.js-animations').bind('change', function () {
var animation = $(this).val();
$('.js-animating-object').animateCss(animation);
});
});
//Copied from https://github.com/daneden/animate.css
$.fn.extend({
animateCss: function (animationName) {
var animationEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
$(this).addClass('animated ' + animationName).one(animationEnd, function() {
$(this).removeClass('animated ' + animationName);
});
}
});