Page 2 of 5

Re: Accordion Menu R2

Posted: Mon Oct 12, 2009 4:49 pm
by Tony Barnes
That would be interesting - would be nice to have it highlighted!

Just to let you know I've posted your code up on http://www.interspire.com/forum/showthr ... #post58700 with credit/thanks. As I said, there have been a lot of requests for it to work on more than 2 levels.

You might even want to pull it out as a new thread.

Re: Accordion Menu R2

Posted: Mon Oct 12, 2009 5:10 pm
by Painstik
Ok, your hover effect works, but click doesn't so i managed to fix it. This is endless accordion menu (activated on click).

Code: Select all

	<script type="text/javascript">
		function initMenu() {
$('#SideCategoryList ul ul').hide();
$('#SideCategoryList li a').click(
function() {
var checkElement = $(this).next();
if(checkElement.is('ul')) {
$(this).next().slideToggle('normal');
return false;
}
}
);
}
$(document).ready(function() {initMenu();});
	</script>
I don't like hover, i like click activation better :)

You can pull out to new thread if you want, cheers

Re: Accordion Menu R2

Posted: Mon Oct 12, 2009 5:18 pm
by Tony Barnes
Nice work, but I prefer the hover... ;) :mrgreen:

lol

Re: Accordion Menu R2

Posted: Tue Oct 13, 2009 1:53 pm
by CharlieFoxtrot
I don't like hover, i like click activation better
Yeah... same here. I'd rather go through the minor "aggravation" of having to click on something that I *want* to see (instead of the aggravation of constantly dealing with the appearance of things that I *don't want* to see.)

Thanks for all the work, guys!

Re: Accordion Menu R2

Posted: Thu Oct 15, 2009 4:27 pm
by gaz
I don't know what I'm doing wrong here but I have two sub cats with products but I also have the main cat with products and I can't get the main cat to show, I only get the child cats :(

Re: Accordion Menu R2

Posted: Thu Oct 15, 2009 5:03 pm
by novista
The drawback with the code I posted is that when you use 'click' to activate, the top level category cannot be selected (open a new page). Javascript is not my forte so I have been in contact with other developers to see if they can find a solution. I'll post here if we come up with something.

Re: Accordion Menu R2

Posted: Thu Oct 15, 2009 9:18 pm
by meules
Hi,

The code only displays the main category and hides the subcats. When clicking on the next main category it shows the previous subcats and hides the subcats of last clicked maincat :( In IE8 the menu works correct, in IE 7 also but in IE6 this problem occurs. I've set the code to click instead of hover, maybe this cause the problem.

Any help appreciated...

Re: Accordion Menu R2

Posted: Thu Oct 15, 2009 9:44 pm
by novista
Hard to say what the problem is without looking at the code. If you want to re-implement it, I can take a look.

Re: Accordion Menu R2

Posted: Tue Oct 20, 2009 9:17 am
by Tony Barnes
For anyone who has done the new variation - move the JS from Header.html to Footer.html as soon as you can.

Whilst in Header.html it knackers the account sign up form, and also lightbox for viewing the product images.

It works fine (as far as I can tell) running in Footer.html

Re: Accordion Menu R2

Posted: Tue Oct 20, 2009 1:19 pm
by Painstik
I recommend this php / html code modification instead of jquery accordion menu, effect is the same, the only thing is that there is no animation...

http://www.interspired.net/forum/viewto ... f=12&t=262