Close menu on selection

More
9 years 10 months ago #27464 by johnoatwork
Hi,

I'm using Maximenu with the pushdown theme and on click activation. The menu items make AJAX calls to display the pages.

Because the page doesn't reload the menu stays open after a selection is made. I need a way to auto close it.

I can put a few lines of code in the AJAX callback if this is the easiest way.

I would appreciate your advice on what this code should be.

Thanks

JM

Please Log in or Create an account to join the conversation.

More
9 years 10 months ago #27472 by ced1870
Replied by ced1870 on topic Close menu on selection
Hi
I have to make some tests by my side to check this, as this is the first time someone ask this. :)
Remind me on thursday, I will have a look
CEd

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

More
9 years 10 months ago #27612 by johnoatwork
Replied by johnoatwork on topic Close menu on selection
OK thanks!

Please Log in or Create an account to join the conversation.

More
9 years 10 months ago #27624 by ced1870
Replied by ced1870 on topic Close menu on selection
looking again at your request I think that you can fire a click event on the link so that the menu will react and then close. You just have to point to the item that has the submenu opened. Is it clear ?

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

More
9 years 10 months ago #27625 by johnoatwork
Replied by johnoatwork on topic Close menu on selection
I probably didn't phrase the question very well. Firing a click event on the active link should of course close the menu.

The difficulty I'm having is getting a reference to the active maximenuck link. My understanding is that Joomla adds the active class to the current menu item but a.active doesn't work. I can fire an event on all "a" links but I don't want to double click everything!

Please Log in or Create an account to join the conversation.

More
9 years 10 months ago #27627 by johnoatwork
Replied by johnoatwork on topic Close menu on selection
Actually I don't think it will work. If I click the link a second time it just reloads the page. It doesn't close the menu.

Please Log in or Create an account to join the conversation.

Time to create page: 0.207 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 1072 guests and no members online