Ирина345 (02 Июнь 2015 - 11:33) писал:
$(function() { $('#left .block:eq(1) .navigation li').click(function() { var next = $(this).next('li'); if(next && next.hasClass('incat')) { while(true) { next = $(next).toggle().next('li.incat'); if (!next.length) break; } return (false); } }).filter('.incat').hide().end().filter(':not(.incat)').each(function() { var next = $(this).next('li'); if(next && !next.hasClass('incat')) { $(this).css('background', 'none'); } }); });
замените на
$(function() { $('.block .navigation li').click(function() { var next = $(this).next('li'); if(next && next.hasClass('incat')) { while(true) { next = $(next).toggle().next('li.incat'); if (!next.length) break; } return (false); } }).filter('.incat').hide().end().filter(':not(.incat)').each(function() { var next = $(this).next('li'); if(next && !next.hasClass('incat')) { $(this).css('background', 'none'); } }); });
При нажатии на подкаталог, он сворачиается
Нужно точно такое же меню, как основное