I really like the off-canvas menu. It works with Nice Menus but in order to make it work, I had to make a couple of edits so I'm not sure that I'm doing this right.

In screen.scss, I changed .main-menu (lines to 383 and 407) to #block-nice-menus-1 since that appears to be the id that Nice Menus creates when you assign a Nice Menu to a block.

In script.js changed line 38 from
$('.main-menu').toggleClass('open');

to

$('#block-nice-menus-1').toggleClass('open');

then the off-canvas menu worked beautifully. Is there a more efficient way to do this? Thanks.

Comments

nicxvan’s picture

This didn't work for me using superfish and replacing .main-menu with #block-superfish-2

jpamental’s picture

Hey Stan -

I forgot to include that I was using the 'block_class' menu to add a .main-menu class on the block itself. If you do that, then this should work as-is.

jpamental’s picture

Nic - I haven't looked at what classes are added by the Superfish module versus Nice_Menus - but I bet we could work it out. I'll take a look!

stanb’s picture

Jason,
Your solution in #2 worked. I installed the Block Class module, added the class main-menu to the block, and it works as advertised. Thank you!

Stan

jpamental’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)

(theme requires the block_class module - explanation given above)

nicxvan’s picture

Version: 7.x-1.x-dev » 7.x-1.0-beta1
Category: Support request » Bug report
Priority: Normal » Major
Status: Closed (works as designed) » Needs work

Seems that the latest reworking breaks the off canvas menu.

I have the main-menu class set using block class and nice menu in the navigation set up. It's a subtheme from the starterkit.

I have this working on another site, same set up. I've tried both locally and remotely but the off canvas menu does not appear when clicking the link.

jpamental’s picture

It may just be in the child theme - I need to update the CSS there a bit. Will look into it as quick as I can.

nicxvan’s picture

I haven' tbeen able to see what's up yet, you may want to look at the issue I just added and related here cause it may be the same thing, something is happening with inheritance of the theme it looks like.

nicxvan’s picture

jpamental’s picture

Status: Needs work » Closed (fixed)

Fixed in latest dev commit. Needed to rename base theme JS file (it wasn't loading because it was named the same in the child theme)

nicxvan’s picture

Confirmed.