Skip to content

Commit

Permalink
add javascript for step by step nav
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGoodall committed Aug 5, 2024
1 parent 7022b74 commit 9964a78
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/assets/js/step-by-step-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,11 +400,13 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
this.stepContent.classList.remove('js-hidden')
toggleLinkText.innerHTML = this.hideText
stepChevron.classList.remove('gem-c-step-nav__chevron--down')
this.stepContent.style.display = 'block'
} else {
this.stepElement.classList.remove('step-is-shown')
this.stepContent.classList.add('js-hidden')
toggleLinkText.innerHTML = this.showText
stepChevron.classList.add('gem-c-step-nav__chevron--down')
this.stepContent.style.display = 'none'
}
this.titleButton.setAttribute('aria-expanded', isShown)
}
Expand Down
3 changes: 2 additions & 1 deletion webpack.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export default {
entry: {
map: '/src/assets/js/map.js',
application: '/src/assets/js/application.js',
statusPage: '/src/assets/js/statusPage.js'
statusPage: '/src/assets/js/statusPage.js',
'step-by-step-nav': '/src/assets/js/step-by-step-nav.js'
},
output: {
filename: '[name].bundle.js',
Expand Down

0 comments on commit 9964a78

Please sign in to comment.