Author: | louisho5 |
---|---|
Views Total: | 450 views |
Official Page: | Go to website |
Last Update: | June 15, 2022 |
License: | MIT |
Preview:

Description:
cookieBar.js is a lightweight JavaScript library for creating a minimal, clean, animated, responsive cookie consent notice bar on the page.
How to use it:
1. Download and load the minified version of the cookieBar.js library in the document.
<script src="cookieBar.js"></script>
2. Create a placeholder element for the cookie consent notice bar.
<div id="cookieBar"></div>
3. Initialize the cookieBar.js and done.
new cookieBar();
4. Customize the cookieBar by passing the following options while initializing.
new cookieBar({ // selector selector: "#cookieBar", // cookie consent message message: 'By using our site you agree to our use of cookies to give you the best experience on our website.', // text for accept button button: 'ACCEPT', // primary color theme: '#666666', // expire in 24 hours expire: 24, });