This problem has bothered me for many hours now, and I hope somebody can help me.
I have the following code, which opens and closes a recursive UL menu. It works everywhere, except IE9. However, it only works when I refresh the page with CTRL+F5. If I don't refresh with CTRL+F5 I get a bunch of errors like the following:
- SCRIPT5022: DOM Exeption: SYNTAX_ERR (12); (refering to if (currentLink))
- SCRIPT5022: DOM Exeption: SYNTAX_ERR (12); (refering to currentLink.parent().find)
Does anybody know what's going on here?
$('.groups').find('li:has(ul)').find('.uitklapTrigger').click(function(){
var currentLink = $(this);
if (currentLink.parent().find('ul').first().is(":hidden")){
currentLink.children('.plmin').html('-');
currentLink.parent().find('ul').first().slideDown('slow');
} else {
currentLink.parent().find('ul').first().slideUp("slow", function(){
currentLink.children('.plmin').html('+');
});
}
return false;
});