I have the following code which shows nested ul and hides the other open ones on click. my question is how can i add a background image to the parent li a that opens the nested ul and removes the background image from the parent li a of the ones it closes?
here is my jquery:
$(document).ready(function() {
$('ul ul').hide();
$('ul li > a').click(function(event) {
$('ul ul').hide('slow');
$(this).parent().find('ul').show('slow');
});
});;
and inline styles;