The fadeToggle() method is used to switch between fadeIn and fadeOut effects.
If the element is visible, it fades out.
If the element is hidden, it fades in.
This method is very useful when creating toggle buttons with smooth animations.
Each click alternates between fade in and fade out.
Animation duration can be controlled using milliseconds.
Predefined speed values simplify animation control.
fadeToggle() Method Notes:
- Combines fadeIn and fadeOut
- Smooth visual transitions
- Supports speed values
- Useful for interactive UI elements