I am trying to do some thing I'd like to think is simple.
animate a partially hidden element on hover, then when i click it, close it.
$('#call-to-action').hover(function(){
$('#call-to-action').animate({
right: '0px'
}, 1000);
$('.cta-open').hide();
$('.cta-close').show();
});
$('.cta-close').click(function(){
$('#call-to-action').animate({
right: '-364px'
}, 1000);
$('.cta-close').hide();
$('.cta-open').show();
stop();
});
the fiddle has the code I am using as well as the elements.
any ideas?