My best guess is that it's to do with .slideToggle command.
Does anyone know how to fix this because I'm stuck?
Code: Select all
<__script__ type="text/javascript">
$(document).ready(function(){
$('ul.menu ul').hide();
$('ul.menu').find("li.selected").parent().show();
$('ul.menu').find("li.selectedparent").parent().show();
$('ul.menu li a').not('ul ul a').click(
function() {
var checkElement = $(this).next();
var parent = this.parentNode.parentNode.id;
if($('#' + parent).hasClass('noaccordion')) {
if((String(parent).length > 0) && (String(this.className).length > 0)) {
$(this).next().slideToggle('normal');
}
}
if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
if($('#' + parent).hasClass('collapsible')) {
$('#' + parent + ' ul:visible').slideUp('slow');
}
return false;
}
if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
$('#' + parent + ' ul:visible').slideUp('slow');
checkElement.slideDown('slow');
return false;
}
}
);
})
</__script>