milohuang / reverie

Reverie is a versatile HTML5 responsive WordPress framework based on ZURB's Foundation.
http://theakiba.com/reverie/
MIT License
919 stars 196 forks source link

Mobile Dropdown menus not animating and sub menu items not clickable (SOLVED) #311

Open jessedmatlock opened 9 years ago

jessedmatlock commented 9 years ago

I came across an issue with a clients site where the dropdown menus would not slide to show the dropdown, on iOS.. after researching it, I found that it was the link structure in the dropdown HTML..

Here is the generated menu HTML (from nav.php) before the fix (notice the lack of href):

<li id="menu-item-138" class="menu-item menu-item-main-menu menu-item-products has-dropdown"><a href="#">Products</a>

After - notice the href is now applied to the link

<li id="menu-item-138" class="menu-item menu-item-main-menu menu-item-products has-dropdown"><a >Products</a>

To resolve this.. I adjusted the $attributes var buildout on line 102 from this:

$attributes .= ! empty( $item->url )        ? ' href="'   . esc_attr( $item->url        ) .'"' : '';

To this:

$attributes .= ! empty( $item->url )        ? ' href="'   . esc_attr( $item->url        ) .'"' : ' href="#"';

Just simply made sure that there was an HREF applied, even if it contains '#' as some browsers were failing on this...

No pull request, but this might be a great update! Thanks for all the hard work!!

jessedmatlock commented 9 years ago

Pull Request created