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
cab5beab
Commit
cab5beab
authored
4 months ago
by
minseok.park
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rollback
parent
81936a8d
Pipeline
#21464
passed with stages
in 3 minutes and 51 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
01-nav.js
src/js/01-nav.js
+10
-10
No files found.
src/js/01-nav.js
View file @
cab5beab
...
...
@@ -39,16 +39,16 @@
})
// nav-link 클릭 시 첫 번째 항목으로 이동 처리
document
.
querySelectorAll
(
'.nav-link'
).
forEach
(
function
(
link
)
{
link
.
addEventListener
(
'click'
,
function
(
e
)
{
e
.
preventDefault
()
// 기본 링크 동작 방지
var
parentToggle
=
link
.
closest
(
'.nav-item'
).
querySelector
(
'.nav-item-toggle'
)
if
(
parentToggle
)
{
parentToggle
.
click
()
// 트리 토글
}
window
.
location
.
href
=
link
.
href
// 첫 번째 링크로 이동
})
})
//
document.querySelectorAll('.nav-link').forEach(function (link) {
//
link.addEventListener('click', function (e) {
//
e.preventDefault() // 기본 링크 동작 방지
//
var parentToggle = link.closest('.nav-item').querySelector('.nav-item-toggle')
//
if (parentToggle) {
//
parentToggle.click() // 트리 토글
//
}
//
window.location.href = link.href // 첫 번째 링크로 이동
//
})
//
})
if
(
navMenuToggle
&&
menuPanel
.
querySelector
(
'.nav-item-toggle'
))
{
navMenuToggle
.
style
.
display
=
''
...
...
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