1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| /*
Basé sur Simple JQuery menu de Marco van Hylckama Vlieg
Web: http://www.i-marco.nl/weblog/
*/
jQuery().ready(function() {
$('ul.nimenu ul').hide();
$.each($('ul.nimenu'), function(){
$('#' + this.id + '.expandfirst ul:first').show();
});
$('ul.nimenu li a').click(
function() {
var checkElement = $(this).next();
var parent = this.parentNode.parentNode.id;
if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
$('#' + parent + ' ul:visible').slideUp('normal');
checkElement.slideDown('normal');
return false;
}
}
);
$('li.current_page_item').parents('li').find('a:eq(0)').click();
}); |