1) Script Title: ddaccordion

2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...daccordion.htm

3) Describe problem:

I'm trying to implement the accordion so that if the accordion is clicked on it will expand and show the submenu. But if the submenu is expanded and the header is clicked on, it will go to it's URL.

This would be for a shopping cart where the headers are category page, and the submenu displays products. While viewing a product page, clicking on the header will display a page full of products for that category.

This post has a solution that I think should work, but doesn't:


When I implement his solution, I get redirected to domainname.com/undefined

I've tried it as the last thing in the <head> section, and as the last thing in the <body> section.

Any thoughts on how I can get this?



PS - I've got it working with mouseover, but I'd really like it to work with clicks...