GDPR Cookie Consent JavaScript Plugin

GDPR Cookie Consent JavaScript Plugin 01

GDPR Cookie Consent JavaScript plugin makes your site and blog to be fulfilled with the European cookie and General Data Protection Regulation (GDPR). This small jQuery plugin adds a simple Cookie Bar with info about cookies which is being used.

GDPR JavaScript Plugin is a simply adapted that contains the ingenious multilingual function. The plugin is used to create a multi-language and customizable cookie permission message to informs visitors that your site uses cookies. New language for Cookie Bar. can be added. You just need to use this addTranslation method.

GDPR Cookie Consent JavaScript Multilingual Plugin


The easiest ways to download and install this plugin.

Install Via npm

$ npm i kovarp-jquery-cookiebar

Clone repository

$ git clone

Add to page

Link plugin CSS file in page head

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

Link plugin script file after jQuery

25 Useful jQuery Plugins
<script src="jquery.min.js"></script>
<script src="jquery.cookieBar.js"></script>


Examples of plugin using.

Default initialization

$(function() {

Initialization with custom options

$(function() {
		style: 'bottom'


style - Define style of display cookie bar on page

default: 'top'
options: 'top', 'bottom', 'bottom-left', 'bottom-right'
wrapper - Wrapper, where the cookie bar will prepended

default: 'body'
options: string
expireDays - Number of days, when the cookies will expires

default: 365
options: integer
infoLink - URL for "more info link"

default: ''
options: string
infoTarget - Targer for "more info link"

default: '_blank'
options: '_blank', '_self', '_parent', '_top'
language - Language of the cookie bar

default: $('html').attr('lang') || 'en'
options: 'ISO 639-1 Language Code'
The default value means, that the plugin detect automatically language from html lang attribute.

privacy - Show privacy protection button (GDPR)

default: false
options: false, 'popup', 'bs_modal', 'link'
privacyTarget - Target attribute for "privacy button link"

default: '_blank'
options: '_blank', '_self', '_parent', '_top'
privacyContent - Content for privacy button

default: null
options: null, 'custom HTML', 'Bootstrap modal ID', 'url'

Languages support

You can add new language for Cookie Bar. Just use this addTranslation method.

jQuery scrolltop: The New Way to Keep Your Scrolling Handy
$(function() {
	$.cookieBar('addTranslation', 'de', {
		message:	'Zur Bereitstellung von Diensten verwenden wir Cookies. Durch die Nutzung dieser Website stimmen Sie zu.',
		acceptText:	'OK',
		infoText:	'Mehr Informationen',
		privacyText:	'Datenschutz'
Then, you can initialize the Cookie Bar with your own language.

$(function() {
		language: 'de'

File Info.

File Size16.90 KB
Last Update5 Months Ago
Published Date3 Years Ago