I'm trying to create an accordion type menu using the following JQUERY:
function initMenu() {
$('#menu ul').hide();
$('#menu li a').click(
function() {
$(this).next().slideToggle('normal');
$(this).css("background", "url(customnav_selected.png) top right");
}
);
}
$(document).ready(function() {initMenu();});
This works to a point, when i click the menu link it expands and the menu header background changes.
However I want it to change back when I click it for a second time to collapse the menu.
Can anyone help?