JQuery Accordion (Two Tasks)
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

First I want the accordion to close when you click a second time on the graphic. So first click it opens like it currently does. Second click on the graphic is closes or rolls up.

Second I need the 'Menu' to go to a different page and not a accordion.

awarded to iurisilvio

Crowdsource coding tasks.

1 Solution

Winning solution

To solve the first problem, change this line in your javascript: $(this).next().slideDown(200).siblings('dd').slideUp(200);

Use this line instead: $(this).next('dd').slideToggle(200).siblings('dd:visible').slideUp(200);

To solve the second problem, change this line: <dt class="bg2"> </dt>, with this line: <a href="dinner.html"><dt class="bg2"> </dt></a>. Also, remove the <dd> element after the "Menu" element.

That worked! How about the second issue?
gomindstorm 6 years ago
It was already in the solution, I edited it just to explicit it.
iurisilvio 6 years ago