Skip to content

Commit

Permalink
Use the GOV.UK anchor-buttons.js script
Browse files Browse the repository at this point in the history
Use GOV.UK anchor-buttons.js to trigger the click event of element(s)
with role="button" when the space key is pressed.
  • Loading branch information
gemmaleigh committed Aug 11, 2016
1 parent 6862f07 commit 8ea8607
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ $(document).ready(function() {
var $blockLabels = $(".block-label input[type='radio'], .block-label input[type='checkbox']");
new GOVUK.SelectionButtons($blockLabels);

// Use GOV.UK anchor-buttons.js to trigger the click event of element(s)
// with role="button" when the space key is pressed.
GOVUK.anchorButtons.init();

// Show and hide toggled content
// Where .block-label uses the data-target attribute
var toggleContent = new ShowHideContent();
Expand Down

0 comments on commit 8ea8607

Please sign in to comment.