diff --git a/app/assets/javascripts/collapsibleCheckboxes.js b/app/assets/javascripts/collapsibleCheckboxes.js index 6f378c074..3eea8693d 100644 --- a/app/assets/javascripts/collapsibleCheckboxes.js +++ b/app/assets/javascripts/collapsibleCheckboxes.js @@ -1,6 +1,8 @@ -(function (Modules) { +(function (global) { "use strict"; + const GOVUK = global.GOVUK; + function Summary (module) { this.module = module; this.$el = module.$formGroup.find('.selection-summary'); @@ -56,8 +58,9 @@ Footer.prototype.getEl = function (expanded) { const buttonState = expanded ? 'done' : 'change'; const buttonContent = this.buttonContent[buttonState](this.fieldLabel); + const stickyClass = expanded ? ' js-stick-at-bottom-when-scrolling' : ''; - return $(`