This script does not work properly when the div #nav has position fixed. The error occurs only in Safari and iCab and only with #nav position fixed. In Firefox, IE, Opera an in Mac OS Chrome it works fine.
Has anyone any idea what the problem is?
- $("#nav ul li ul").hide(); if ($("#nav ul li ul li").hasClass("aktuell")) { $(".aktuell").closest("ul").show("fast", navKl); } $("#nav ul li h3").click(function() { if ($(this).next().is(":hidden")) { $("#nav ul li ul").slideUp("normal", navKl); } $(this).next().slideToggle("normal", navKl); }); function navKl() { if ($(this).is(":visible")) { $(this).parent().addClass("offen"); } else { $(this).parent().removeClass("offen"); } };