3Depth(level) 만들기
·
🐣codeLab
1Depth - 2Depth - 3Depth - 3Depth - 3Depth - 2Depth - 3Depth - 3Depth - 2Depth - 2Depth 1Depth - 2Depth - 3Depth - 3Depth - 2Depth - 3Depth - 3Depth - 3Depth 1Depth - 2Depth - 2Depth 1Depth /* reset css */ * { margin: 0; padding: 0; } li { list-style: none; } a, a:active, a:focus { color :#222; text-decoration: none; } /*************** 1Depth ***************/ .lnb { position: relative; width: 20..
[아코디언메뉴] 3level accordion menu
·
🐣codeLab
[아코디언메뉴] 3level accordionMenu 먼저 결과. 코드리뷰. 1. slideDown() 조건. 해당 a 클릭 시, a 바로 밑 형제 요소 ul 이 존재하며, ul이 보이지 않아야 한다. $('a').on('click', function() { // 1. ul 존재하며, ul이 보이지 않아야한다. if( $(this).next().is('ul') && !($(this).next().is(':visible')) ) { // console.log('slideDown'); $(this).next().slideDown(); return false; } }); 2. slideUp() 조건 해당 a클릭 시, a 바로 밑 형제 요소 ul이 존재하며, ul이 보여야한다. $('a').on('click',..