Closed (fixed)
Project:
Corporate Clean
Version:
7.x-1.4
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Mar 2012 at 17:40 UTC
Updated:
1 Aug 2013 at 20:08 UTC
Thanks for the great theme. Out of the box my top nav didn't work on an iPhone because there's no :hover.
Here's what I did to enable it:
In template.php add:
/**
* Add some js so our menus work for users w/ out hover
*/
drupal_add_js('jQuery(document).ready(function($) {
$("#header-menu ul.menu li").bind("touchstart", function(){
$(this).toggleClass("hover");
});
});',
array('type' => 'inline', 'scope' => 'header', 'weight' => 5)
);
And then to style.css somewhere around line 292 add a 3rd selector:
#header-menu ul.menu li.expanded:hover, #header-menu ul.menu li.expanded:hover > ul.menu, #header-menu ul.menu li.expanded.hover > ul.menu { display:block; }
Sorry to be lazy and not make a legit patch but I had trouble making a child theme and so I've got the core all hacked up so it's hard to submit a discrete patch.
C-
Comments
Comment #1
alexandreracine commentedIs this corrected in the latest version? Let us know if not. Closing for now.