Files
notifications-admin/app/assets/javascripts/homepage.js
Chris Hill-Scott 7463510378 Progressively enhance the proposition illustration
When users with Javascript enabled request it we can show a higher
quality SVG image which will look better in certain circumstances.
2021-02-11 17:03:13 +00:00

25 lines
498 B
JavaScript

(function(window) {
"use strict";
window.GOVUK.Modules.Homepage = function() {
this.start = function(component) {
let $component = $(component);
let iterations = 0;
let timeout = null;
$component.on('click', () => {
if (++iterations == 5) {
$component.toggleClass('product-page-intro-wrapper--alternative');
}
clearTimeout(timeout);
timeout = setTimeout(() => iterations = 0, 1500);
});
};
};
})(window);