mirror of
https://github.com/GSA/notifications-admin.git
synced 2025-12-09 22:53:27 -05:00
When users with Javascript enabled request it we can show a higher quality SVG image which will look better in certain circumstances.
25 lines
498 B
JavaScript
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);
|