Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SWLab UI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
SWD
SWLab UI
Commits
302c436f
Commit
302c436f
authored
4 months ago
by
minseok.park
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test nav
parent
fcad5113
Pipeline
#21641
passed with stages
in 3 minutes and 54 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
01-nav.js
src/js/01-nav.js
+5
-0
No files found.
src/js/01-nav.js
View file @
302c436f
...
...
@@ -44,6 +44,11 @@
var
li
=
this
.
parentElement
var
currentDepth
=
parseInt
(
li
.
dataset
.
depth
,
10
)
// 현재 nav-item의 depth 가져오기
// 이미 'is-active' 클래스가 있거나 현재 navItem이 currentPageItem과 같은 경우 액션 수행 안 함
if
(
li
.
classList
.
contains
(
'is-active'
)
||
li
===
currentPageItem
)
{
return
// 액션을 수행하지 않고 종료
}
// href가 '#'인 경우 (클릭한 항목이 단순 펼침 액션 대상일 때)
if
(
this
.
getAttribute
(
'href'
)
===
'#'
)
{
// 다음 depth의 항목을 찾음 (현재 depth + 1)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment