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

Fix toggled content #198

Merged
merged 2 commits into from
Mar 21, 2016
Merged

Fix toggled content #198

merged 2 commits into from
Mar 21, 2016

Conversation

gemmaleigh
Copy link
Contributor

Rather than setting display:none and display:block using show(); and
hide(), add and remove the .js-hidden class.

I think this was introduced by this change to the GOV.UK template, which sets both display:none and visibility:hidden, and the visibility:hidden isn't removed when show and hide are used.

This fixes #197.

I've also removed .js-enabled .js-hidden from GOV.UK elements as this is defined in the template.

It is worth noting that #183 has a much better implementation of the JS for toggles.

cc. @robinwhittleton @edwardhorsford.

Rather than setting display:none and display:block using show(); and
hide(), add and remove the js-hidden class.
These are both set by govuk_template, so should not be duplicated here.
@robinwhittleton
Copy link
Contributor

Happy with this, will merge.

robinwhittleton added a commit that referenced this pull request Mar 21, 2016
@robinwhittleton robinwhittleton merged commit ff3e187 into master Mar 21, 2016
gemmaleigh added a commit that referenced this pull request Mar 21, 2016
- Fix issue #197, toggled content not displaying
  PR (#198)
  - Instead of using show() and hide(), add and remove the .js-hidden
class
  - The govuk_template sets .js-hidden, remove duplicate in helpers.scss
@gemmaleigh gemmaleigh mentioned this pull request Mar 21, 2016
@gemmaleigh gemmaleigh deleted the bugfix-toggled-content branch June 2, 2016 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Toggled content not displaying
2 participants