I've been following the afore mentioned book, I'm using the accordion script (slightly modified).

How can I stop a link from being clicked when it is active? In the book it says to use "return" & ".stop(true, true)" however when I apply this the accordion stops working. I think it stops working as the accordion loads fully closed.

Here's my code:

Code:
$('nav ul > li ul').click(function(e) { e.stopPropagation(); }).hide(); 
	
	$('nav ul > li').click(function() { 
		var selfClick = $(this).find('ul:first').is(':visible');
		if (!selfClick) {
			
			$(this).parent().find('> li ul:visible').slideToggle();
			$('#bg img').delay(500).fadeTo('slow', 0.75); 
		}
		$(this).find('ul:first').stop(true, true).slideToggle(); $('.intro').fadeOut();
Hope this makes sense.