|
Lines 27-32
Link Here
|
| 27 |
initialiseSelected(); |
27 |
initialiseSelected(); |
| 28 |
}); |
28 |
}); |
| 29 |
|
29 |
|
|
|
30 |
$(window).on("scroll", function() { |
| 31 |
const consentBar = $("#cookieConsentBar"); |
| 32 |
const langmenu = $("#changelanguage"); |
| 33 |
const wrapper = $("#wrapper"); |
| 34 |
if( langmenu ) { |
| 35 |
const height = langmenu.height(); |
| 36 |
if( $(window).scrollTop() >= wrapper.offset().top + wrapper.outerHeight() - window.innerHeight ) { |
| 37 |
consentBar.css("bottom", height); |
| 38 |
} else { |
| 39 |
consentBar.css("bottom", 0); |
| 40 |
} |
| 41 |
}; |
| 42 |
}); |
| 43 |
|
| 30 |
// Initialise existing consent based on local storage |
44 |
// Initialise existing consent based on local storage |
| 31 |
function getExistingConsent() { |
45 |
function getExistingConsent() { |
| 32 |
existingConsent = localStorage.getItem('cookieConsent') ? |
46 |
existingConsent = localStorage.getItem('cookieConsent') ? |
|
Lines 36-48
Link Here
|
| 36 |
|
50 |
|
| 37 |
function showConsentBar() { |
51 |
function showConsentBar() { |
| 38 |
const consentBar = $('#cookieConsentBar'); |
52 |
const consentBar = $('#cookieConsentBar'); |
| 39 |
const langmenu = $('#changelanguage'); |
|
|
| 40 |
if(langmenu) { |
| 41 |
const height = langmenu.height(); |
| 42 |
consentBar.css('bottom', height); |
| 43 |
}; |
| 44 |
consentBar.attr('aria-hidden', 'false'); |
53 |
consentBar.attr('aria-hidden', 'false'); |
| 45 |
consentBar.show(); |
54 |
consentBar.css("display", "flex"); |
| 46 |
} |
55 |
} |
| 47 |
|
56 |
|
| 48 |
function hideConsentBar() { |
57 |
function hideConsentBar() { |
| 49 |
- |
|
|