Small Configurable EU Cookie Law Notice Bar Plugin - cookieBar

File Size: 9.35 KB
Views Total: 2865
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Small Configurable EU Cookie Law Notice Bar Plugin - cookieBar

Just another jQuery plugin for helping webmasters/bloggers with cookie consent that creates a small bar with a short message about the use of cookies and other forms of local storage.

How to use it:

1. Include the required cookieBar.css file to style the cookie bar.

<link rel="stylesheet" href="cookieBar.css">

2. Include jQuery library and the JavaScript file cookieBar.js at the bottom of the webpage.

<script src="//"></script>
<script src="jquery.cookieBar.js"></script>

3. Initialize the plugin on document ready to generate a default cookie bar at the top of the webpage.


4. If you'd like to create your own cookie bar:

<div class="cookie-message">
  <p>By using this website you allow us to place cookies on your computer. They are harmless and never personally identify you.</p>

5. Override the default styles of the cookie bar whatever you like:

.cookie-message {
  padding:0 85px 0 20px;
  border-bottom:1px solid #ccc;
  box-shadow:0px 0px 3px #ccc;
  z-index: 99;

6. All default plugin parameters:


  // custom close button
  'closeButton': 'none',

  // hide the cookir bar on close
  'hideOnClose': true,

  // if the cookie transmission requires secure protocal (https)
  'secure': false,

  // the path the cookie is valid for
  'path': '/',

  // the domain the cookie operates on
  'domain': '',

  // cookie name
  'name': 'cookiebar',

  // expires after 365 days
  'expiresDays': 365



  • Added expires and cookie name options

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