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.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; }); });
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.