I'm not that experienced with jQuery and I'm having some difficulty triggering an animation from the animate.css library. I've got it to work using clicks, but not in the area I want.
Here's the function that works with clicking:
$(function() {
var animation_name = 'animated shake';
var animation_end = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
$('#link-add').on('click',function() {
$('#add-paypal').addClass(animation_name).one(animation_end,function() {
$(this).removeClass(animation_name);
});
});
});
And here's where I want to make it work:
$('#add-link').on('change', function() {
var animation_name = 'animated shake';
var animation_end = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
var link = $('#add-link').val();
var paypal = $('#add-paypal').val();
if (! paypal)
{
//Animate #add-paypal
};
else
{
//Animate #link-add
};
});