animate() Method


The animate() method is used to create custom animations in jQuery.

It allows you to change CSS properties gradually over time.

Only numeric CSS properties can be animated such as width, height, opacity, and position.

This increases the width of the element smoothly.

Multiple CSS properties can be animated at the same time.

Position-based animation requires the element to have position relative or absolute.

animate() Method Notes:

  • Used for custom animations
  • Works with numeric values
  • Supports multiple properties
  • Powerful UI animation tool