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

Use SelectionButtons live selector, for JS/AJAX content #535

Merged
merged 1 commit into from
Jan 26, 2015

Conversation

dsingleton
Copy link
Contributor

Some GOV.UK pages, like Smart Answers, load content via JS, including
radio buttons or checkboxes. These will be added to the DOM after the
selector is run and the resulting elements are passed to SelectionButtons

SelectionButtons can also take a string selector and use document
events (alphagov/govuk_frontend_toolkit#139)
so use that and any JS loaded content will get the behaviour too.

@robmckinnon spotted this in alphagov/smart-answers#1419, but it's better to fix it in the app we're applying it (otherwise we'll run into versioning problems eventually)

Some GOV.UK pages, like Smart Answers, load content via JS, including
radio buttons or checkboxes. These will be added to the DOM after the
selector is run and the resulting elements are passed to SelectionButtons

SelectionButtons can also take a string selector and use document
events (alphagov/govuk_frontend_toolkit#139)
so use that and any JS loaded content  will get the behaviour too.
alicebartlett added a commit that referenced this pull request Jan 26, 2015
Use SelectionButtons live selector, for JS/AJAX content
@alicebartlett alicebartlett merged commit 1e35933 into master Jan 26, 2015
@alicebartlett alicebartlett deleted the selection-button-live-events branch January 26, 2015 11:25
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.

2 participants