Skip to content

Commit

Permalink
Initialise skip link JavaScript
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanita Barrett committed Dec 16, 2021
1 parent ef04c54 commit 8521297
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/javascripts/govuk-frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import NotificationBanner from 'govuk-frontend/govuk/components/notification-ban
import Radios from 'govuk-frontend/govuk/components/radios/radios'
import Header from 'govuk-frontend/govuk/components/header/header'
import Tabs from 'govuk-frontend/govuk/components/tabs/tabs'
import SkipLink from 'govuk-frontend/govuk/components/skip-link/skip-link'

var nodeListForEach = common.nodeListForEach

Expand Down Expand Up @@ -68,3 +69,7 @@ var $tabs = document.querySelectorAll('[data-module="govuk-tabs"]')
nodeListForEach($tabs, function ($tab) {
new Tabs($tab).init()
})

// Find first skip link module to enhance.
var $skipLink = document.querySelector('[data-module="govuk-skip-link"]')
new SkipLink($skipLink).init()

0 comments on commit 8521297

Please sign in to comment.