jQuery Plugin To Display EU Cookie Law Alert Popups

jQuery Plugin To Display EU Cookie Law Alert Popups
File Size: 95 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

A lightweight jQuery notification plugin that displays a fully customizable cookie alert popup to make your website compliant with the EU Cookie Law.

How to use it:

1. Include the jQuery EU Cookie Law popups plugin's files in your website. 

<link href="css/jquery-eu-cookie-law-popup.css" rel="stylesheet">
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="js/jquery-eu-cookie-law-popup.js"></script>

2. Create a container with the CSS class 'eupopup' to place the cookie alert popup.

<div class="eupopup"></div>

3. Use the following helper classes to customize the popup.

<!-- Custom positions -->
<div class="eupopup eupopup-top"></div>
<div class="eupopup eupopup-fixedtop"></div>
<div class="eupopup eupopup-bottom"></div>
<div class="eupopup eupopup-bottomleft"></div>
<div class="eupopup eupopup-bottomright"></div>
<div class="eupopup eupopup-block"></div>

<!-- Custom colors & styles -->
<div class="eupopup eupopup-color-default"></div>
<div class="eupopup eupopup-color-inverse"></div>
<div class="eupopup eupopup-style-compact"></div>

4. Modify the plugin parameters in the jquery-eu-cookie-law-popup.js to fit your needs.

cookiePolicyUrl : 'Policy Url',
popupPosition : 'top',
colorStyle : 'default',
compactStyle : false,
popupTitle : 'Popup Title',
popupText : 'Popup Text',
buttonContinueTitle : 'Continue',
buttonLearnmoreTitle : 'Learn&nbsp;more',
buttonLearnmoreOpenInNewWindow : true,
agreementExpiresInDays : 30,
autoAcceptCookiePolicy : false,
htmlMarkup : null // custom popup template

Change log:

2015-03-26

  • [fix] z-index value to 999999

This awesome jQuery plugin is developed by wimagguc. For more Advanced Usages, please check the demo page or visit the official website.