Hi Guys,

I'm attaching a small patch here to add basic mobile menu support to Zen themes.

It uses the menu title as the trigger and then expands and contracts the menu when clicked.
It's set to kick in at 480px (same as when the menu position changes in Zen).

This is my first time submitting a patch to Zen so am not sure if I was supposed to patch Zen or STARTERKIT, so I went with STARTERKIT since it's a replica of the Zen theme I used to create this.

To use this, make sure you comment in the line for js/script.js in the theme's .info file.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

markconroy’s picture

JohnAlbin’s picture

Version: 7.x-5.5 » 7.x-6.x-dev
Assigned: markconroy » Unassigned
Status: Active » Needs review

Sorry I didn't see this earlier.

Issues with patches should be marked "needs review"! :-) Also, it should go in the latest -dev release rather than marked against the latest stable release.

markconroy’s picture

Thanks John,

I'll amend and re-submit.

JohnAlbin’s picture

Status: Needs review » Needs work
+++ b/STARTERKIT/js/script.js
@@ -17,10 +17,40 @@
+      $('#main-menu h2').click(function() {

The problem with this line is that it will add a click handler on page and every time an AJAX response is returned. You need to add the context variable as the second parameter of $().

markconroy’s picture

Thanks John. Been working on a full rewrite of this. Will take that on board as well.

JohnAlbin’s picture

Version: 7.x-6.x-dev » 8.x-7.x-dev

No new features are being accepted for Drupal 7 versions.