=== AddonLogic Dropdown Menu Animations ===
Contributors: snehalpancholi
Tags: menu, dropdown, animation, submenu, navigation
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Adds configurable fade, slide, grow, or flip animations to WordPress nav submenu dropdowns — CSS keyframes with a tiny JS controller.

== Description ==

AddonLogic Dropdown Menu Animations replaces the instant-show behaviour of WordPress nav submenu dropdowns with smooth CSS keyframe animations. Choose from four animations, configure duration and easing, set a hover delay to prevent accidental triggers, and supply a custom CSS selector to target any theme's submenu structure.

**Animations**

* **Fade In** — opacity 0 → 1
* **Slide Down** — fades in while sliding 10 px down from above
* **Grow** — scales from 0.9 to 1 (combine with transform-origin for direction)
* **Flip** — 3D perspective rotation on X-axis opening effect
* **None** — disables the plugin entirely

**Other features**

* Configurable duration (50–2000 ms) and CSS easing
* Transform-origin picker (top, top-left, top-right, centre)
* Hover delay to prevent flicker on fast cursor passes
* Custom sub-menu CSS selector (compatible with any theme)
* Respects `prefers-reduced-motion` media query (optional)
* ARIA `aria-expanded` attributes updated on open/close
* Keyboard (focus) accessible — opens on focus-in, closes on focus-out
* No jQuery

== Installation ==

1. Upload the `dropdown-menu-animations` folder to `/wp-content/plugins/`.
2. Activate the plugin.
3. Go to **Settings → Dropdown Menu Animations** and choose your animation.
4. If animations do not appear, adjust the **Sub-menu Selector** to match your theme's submenu class.

== Frequently Asked Questions ==

= The animation does not show. =
Your theme may use a different sub-menu class. Open browser DevTools, inspect the dropdown `<ul>`, and update the Sub-menu Selector setting to match. E.g. `.site-nav .dropdown-menu`.

= My theme already controls submenu visibility with CSS. =
Some themes use `display:none`/`display:block` transitions. The plugin adds `.dma-ready` and `.dma-open` classes to parent `<li>` elements and sets `visibility`/`opacity` via its own CSS. If the theme's CSS conflicts, you may need to override it or add a small custom CSS snippet.

= Does it work on mobile? =
On touch devices, hover events become tap events. The animation plays on first tap (opening) and a second tap or clicking outside closes the menu.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
