This time I will share jQuery Plugin and tutorial about Simple EU Cookie Law Notice Popup Plugin With jQuery – Qookies, hope it will help you in programming stack.
Qookies is a jQuery plugin that displays your cookies disclaimer in a popup window to make your website comply with the EU cookie law.
How to use it:
1. Place the core style sheet and a theme CSS of your choice into the header of the document.
1 |
< link href = "qk-default.css" rel = "stylesheet" > |
2 |
< link href = "qk-theme-default.css" rel = "stylesheet" > |
2. Create an empty container for the cookies disclaimer popup.
1 |
< div class = "qookies" ></ div > |
3. Place jQuery library and other required JavaScript files at the end of the document.
1 |
< script src = "//code.jquery.com/jquery.min.js" ></ script > |
2 |
< script src = "min/js/js.cookie.js" ></ script > |
3 |
< script src = "min/js/qookies.js" ></ script > |
4. Customise the notice text and link to your cookie policy page like this:
02 |
title: "Privacy Policy" , |
03 |
description: "<p> This website uses cookies to ensure you get the best experience on our website. </p>" , |
06 |
url: "//www.jqueryscript.net/privacy/" |
5. Call the function on the DIV container you just created and done.
1 |
$( '.qookies' ).qookies(); |
6. All customization options with default values.
01 |
$( '.qookies' ).qookies({ |
02 |
theme: 'theme-default' , |
03 |
position: 'bottom-right' , |
07 |
cookieName: 'qookies-accepted' , |
Change log:
2016-05-25
This awesome jQuery plugin is developed by quanhub. For more Advanced Usages, please check the demo page or visit the official website.