Iv created a basic vertical sliding menu which can be seen here on the left vertical grey bar:
http://www.switchcreative.co.uk/tuckagefinewines/
When you click on a country the sub-menu items slide down and the top level + sign changes to a – but how to I change it back to + when the menu is closed again. I guess I want to add an even to slidetoggles upward motion? but not sure how. I tried using an if statement to change it but couldn’t get it to work here is my closest version to working the way Id like:
function initMenu() {
$('#menu ul:not(.active)').hide();
$('#menu li a.top_a').click(
function(e) {
e.preventDefault();
$(this).next().slideToggle('normal');
$(this).siblings('.plus').replaceWith(' - ');
}
);
}
you’re removing the
span.plustry setting the text like this: