I want to animate the css property clip: rect with jQuery\'s .animate() but can\'t find if this is possible anywhere. Have tried:
$(
@Shivan Raptor
To control duration, add duration: 3000, before the step attribute. So, the code would state:
$('#A').on('click', function() {
$(".img1").animate({
fontSize: 1
},
{
duration:3000,
step: function(now, fx) {
$(this).css('clip', 'rect(0px, '+(now+30)+'px, '+(now+30)+'px, 0px)')
}
}, 1000);
});
You have to play around with exactly how you want the animation to run, but this should help.