PHPBeginner.net - First Draft

It doesn't matter if you do all the error checking in the world, or if you have the most beautiful graphics, if your site or application design isn't usable, it's not going to do well. Get input and advice on usability and user interface issues here.

Moderator: General Moderators

User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Kieran Huggins wrote:

Code: Select all

$(function(){
	$('.tree-navigation li').click(function(){
		$(this).toggleClass("branch-closed").toggleClass("branch-open").focus();
	});
	$('.tree-navigation ul').click(function(){
		return false;
	});
});
So I ran into a small issue with this code, and not knowing Jquery well has come to bite me square in me round arse.

This code works in IE and Firefox. But in Opera and Safari, it will toggle once, toggle twice, then stop toggling. Also, the link clicks are actually firing, so opening/closing a branch is actually loading that anchor that is in there. Any idea how I can stop that from happening? Thanks muchos in advance.
Post Reply