Tiny Customizable EU Cookie Law Notification Plugin With jQuery - cookiefy

Tiny Customizable EU Cookie Law Notification Plugin With jQuery - cookiefy
File Size: 23.5 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Yet another jQuery based EU Cookie Law Notification Plugin for alerting the users about the use of cookies on your website that help you comply with the hideous EU Cookie Law.

How to use it:

1. To use this plugin, first you need to include the jquery.cookiefy.min.js script after jQuery library.

<script src="/path/to/jquery.cookiefy.min.js"></script>

2. Then call the function on the body tag and we're done.

$('body').cookiefy();

3. Config the EU cookie law notice by passing and override the following options as an object to the cookiefy() function.

$('body').cookiefy({

  // enable dev mode
  devMode: false,

  // background color
  backgroundColor: '#bebebe',

  // text color
  color: '#000',

  // CSS styles for top border
  borderTop: '1px solid #000',

  // notice messages
  displayedHtml: 'We use cookies to ensure that we give you the best experience on our website. If you continue, you agree with <strong>our cookie policy</strong>.',

  // CSS prefix
  cssPrefix: pluginName + '_',

  // custom close button
  closeButtonUrl: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3h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SwVPFg+s/ohWmmS1Co3b2zTujQcem5GwHKd0J4mA23fAc3anuvb+1k0sDMzyldx4zWolYBL0g6mH3OsiLMexou3PwHva6Xh7O8GvdBMKi3fzG2gHB4rf7sDHdO0NK+yLTyjq/8Fouva6CLeAIUU9F3ywiVQbYbk5fKbNRDUiNpFqKuxvDnmstgFegh9hItVEWBdtvWCZOpG0jVRh0F5dtF0yw8mOnNlEqnCJtsAmo9vba22EjaJNsck0mUaqcIk2xfhuGqnCJdpcIlW4RJtLpPrC8TDR5hCp9VJ42MK9tkMXqROC3rXCMNFmGan8cdXleJ73CV/+kuvWaRu8zvBfGGm0NQoR6aGBewEGAG5JmYODvoEQAAAAAElFTkSuQmCC'
  
});

About Author:

Author: Mario Lemke

Official Website: https://kmarryo.github.io/jquery.cookiefy/

Change log:

2016-07-27

  • v1.0.4

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