Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GOVUK.ShowHideContent JavaScript #315

Merged
merged 12 commits into from
Sep 5, 2016
2 changes: 1 addition & 1 deletion javascripts/govuk/show-hide-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// Escape name attribute for use in DOM selector
function escapeElementName (str) {
var result = str.replace('[', '\\[').replace(']', '\\]')
return (result)
return result
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could just return the above expression, result isn't used anywhere else so just keep it simple..

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed and done.

}

// Adds ARIA attributes to control + associated content
Expand Down