I am trying to create an animation effect using jQuery animate on a div element where it starts large and then becomes smaller. Here is the code I have written:
$(this).animate({
opacity: 0,
top: "-=100",
width: "38px",
height: "32px"
}, 1500, function () {
$this.remove()
})
However, with this code, the large div does not shrink as intended. How can I modify the code to first make the div larger and then immediately smaller? If there is a way to achieve this using CSS3 instead, I would appreciate any guidance on how to do it in CSS3.
Thank you for your help.