logo maximenuck 64Maximenu CK

Maximenu CK is a Joomla megamenu dropdown with nice effects.

logo slideshowck 64Slideshow CK

Slideshow CK, nice effect with this slideshow responsive design.

logo accordeonmenuck joomlaAccordeon Menu CK

Accordeon menu CK is a joomla accordion menu with mootools effects.

logo template creator joomlaTemplate Creator CK

Template Creator CK is a tool to create your own Joomla! templates.

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Close menu on selection

Close menu on selection 23 May 2015 10:22 #27464

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
The administrator has disabled public write access.

Close menu on selection 24 May 2015 09:41 #27472

  • ced1870
  • ced1870's Avatar
  • OFFLINE
  • Administrateur
  • Posts: 17463
  • Thank you received: 2230
  • Karma: 388
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
The administrator has disabled public write access.

Close menu on selection 29 May 2015 14:47 #27612

OK thanks!
The administrator has disabled public write access.

Close menu on selection 31 May 2015 08:45 #27624

  • ced1870
  • ced1870's Avatar
  • OFFLINE
  • Administrateur
  • Posts: 17463
  • Thank you received: 2230
  • Karma: 388
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
The administrator has disabled public write access.

Close menu on selection 31 May 2015 11:43 #27625

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!
The administrator has disabled public write access.

Close menu on selection 31 May 2015 11:52 #27627

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.
The administrator has disabled public write access.

Close menu on selection 31 May 2015 11:55 #27628

It closes if you click its parent. So I guess what I need it a reference to the parent of the current active link.
The administrator has disabled public write access.

Close menu on selection 31 May 2015 12:35 #27630

  • ced1870
  • ced1870's Avatar
  • OFFLINE
  • Administrateur
  • Posts: 17463
  • Thank you received: 2230
  • Karma: 388
the active class is added to the <li> element, so you can get it with something like
"li.active > a"
Joomlack Webmaster and Developer
The administrator has disabled public write access.

Close menu on selection 31 May 2015 13:09 #27631

The event below only fires when you click the home icon. Clicking any other menu items, either parent or child does not fire the event.

jQuery("li.active > a").click(function() {

alert("firing");
});
The administrator has disabled public write access.

Close menu on selection 31 May 2015 13:12 #27632

  • ced1870
  • ced1870's Avatar
  • OFFLINE
  • Administrateur
  • Posts: 17463
  • Thank you received: 2230
  • Karma: 388
here you are catching the click event, not fire it
give me your url to check
Joomlack Webmaster and Developer
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.214 seconds
Powered by Kunena Forum

Mentions légales

Site made by Cédric KEIFLIN

Privacy policy

Copyright © 2010 - 2015

http://forum.joomlack.fr is not affiliated with or endorsed by the Joomla! Project or Open Source Matters. The Joomla!® name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.

Qui est en ligne

We have 335 guests and 5 members online