Use this script to easily comply with the cookie law.
Just include this script at the end of your page:
<script src="https://common.qoob.io/scripts/cookielaw/qoob.cookielaw.min.js"></script>
This script requires jQuery to be already loaded in the page. If, for whatever reason, you are not already using it, just include this script before the main one.
<script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
If you want to customize the script's behaviour, just declare a variable before linking the main script, like this:
$cookielaw = { minDate: '2018-05-25', // MINIMUM ACCEPTANCE DATE (IF USERS ACCEPTED THE COOKIE POLICY BEFORE THIS DATE THEY WILL BE PROMPTED AGAIN) domain: 'custom.domain.name', // CUSTOM DOMAIN FOR WHICH THE COOKIE WILL BE VALID, USEFUL FOR MULTI-DOMAIN SITES, DEFAULTS TO THE CURRENT DOMAIN culture: 'it', // CUSTOM CULTURE TO USE DIFFERENT SETTINGS (SEE LATER), DEFAULT = 'it' message: { // CUSTOM MESSAGES FOR THE BAR, BASED ON CURRENT CULTURE it: 'Italian custom text here (in HTML), including the <a href="#">policy link</a>', en: 'English custom text here (in HTML), including the <a href="#">policy link</a>' }, policyUrl: { // URL OF THE POLICY TEXT TO BE LOADED IN THE POPOVER, BASED ON CURRENT CULTURE it: 'https://common.qoob.io/scripts/cookielaw/policy/it.min.html', en: 'https://common.qoob.io/scripts/cookielaw/policy/en.min.html' }, policyHRef: { // IF SPECIFIED, THE POLICY LINK WILL NOT SHOW A POPOVER BUT LOAD THE SPECIFIED URL, BASED ON CURRENT CULTURE it: 'https://www.google.com', en: 'https://www.google.com' }, policyHRefTarget: '_blank', // CUSTOM TARGET FOR THE POLICY LINK, IF policyHRef IS SPECIFIED. DEFAULT = same page autoAcceptDelayInMs: 2000, // AUTO-ACCEPT DELAY IN MILLISECONDS. DEFAULT = 2000 autoAcceptOnScroll: false, // AUTO-ACCEPT ON SCROLL. DEFAULT = false autoAcceptOnClickTo: selector/element(s), // AUTO-ACCEPT WHEN CLICKING ON THESE ELEMENTS. IT CAN BE OF TYPE HTML ELEMENT(S), JQUERY ELEMENT(S) OR A SELECTOR (STRING). DEFAULT = false autoRefreshOnAccept: false, // AUTO-REFRESH CURRENT PAGE ON ACCEPTING. DEFAULT = false position: 'top'/'bottom', // THE POSITION OF THE BANNER. DEFAULT = 'bottom' }
Alby & Njy