The slideToggle() method is used to switch between slideUp and slideDown effects.
If the element is visible, it slides up.
If the element is hidden, it slides down.
This method is very useful when creating accordion menus and collapsible sections.
Each click toggles the sliding animation automatically.
Animation duration can be controlled using milliseconds.
Predefined speed values make animation easier to manage.
slideToggle() Method Notes:
- Combines slideUp and slideDown
- Common in accordion UI
- Smooth vertical animation
- Supports speed parameter