Simple jQuery Cookie Consent Plugin

jquery.cookie-consent is a simple jQuery plugin to request consent to use cookies. An easy-to-use and highly customizable cookie consent bar that informs your visitors of the use of cookies on your website.

More features:

  • Ensure that you comply with European Cookie Law
  • Personalized cookie notification message.
  • Custom CSS Styles.
  • Cookie consent information is saved in cookies or web storage.
  • The job is run after the user accepts the policy.

Must Read: A Modal Dialog Bootstrap Cookie Banner Consent Settings and Framework

jquery-cookie-consent

How to make use of it:

1. Load the cookie-consent.js the plugin after jQuery.

<script src="/path/to/cdn/jquery.min.js"></script>
<script src="/path/to/dist/jquery.cookie-consent.min.js"></script>

2. Initialize the plugin to show a cookie consent bar on the web page.

$(function(){
  $.cookieConsent();
});

3. Customize the cookie discover message.

$.cookieConsent({
  message: 'This website uses cookies. Privacy Policy',
});

4. Apply your styles to the cookie consent bar. In this instance, we will repair the cookie consent bar at the top of the web page.

$.cookieConsent({
  style: "position: fixed; width:100%"
});

5. Customize the cookie consent button.

$.cookieConsent({
  consentMessage: "I understand",
  consentStyle: "",
  acceptClass: "cookieAccept",
});

6. Determine the best way to save the cookie consent info.

$.cookieConsent({
  // 10 years
  consentTime: 3650, 

  // cookie, local, or session
  storage: "cookie",
});

7. Enable the event mode.

$.cookieConsent({
  testing: true
});

8. Callback capabilities.

$.cookieConsent({
  onInit: function(){ },
  onConsent: function(){ },
  onTemplate: function(){ console.log(this) },
});

See Demo And Download

Official Website(myspace-nu): Click Here

This superior jQuery/javascript plugin is developed by myspace-nu. For extra Advanced Usage, please go to the official website.

Related Posts

Side-Navigation-Menu-With-Dropdowns-jSide

[Off-Canvas] Simple and Clean Side Navigation Menu With Dropdowns | jSide Menu

JSide menu is a well-designed, simple, and clean side-scrolling menu with dropdown menus. This plugin creates a sticky hamburger button at the top of the page that…

Searchable-Select-Dropdown

A Simple Searchable Select Dropdown Plugin | jQuery Select Search

Simple jQuery search on the selection options plugin for your website. Next, there is a checkbox replacement plugin that refines and beautifies the original selection element with…

country-dropdown-with-flags

A Quick jQuery-Based Country Picker With Flags | Country Select JS

Country Select JS is a jQuery plugin to select a country, based on the international phone input plugin. Adds a flag dropdown to any input, which lists…

Autocomplete-and-Typeahead-Javascript-Library

Simple and Fast Autocomplete and Typeahead Javascript Library | autoComplete.js

autoComplete.js is a simple, pure, and incrementally designed JavaScript library for speed, high versatility, and seamless integration with a wide variety of projects and systems. Features Pure…

Bootstrap-Notification-Message-Alert-Plugin

Bootstrap Notification Message Alert Plugin with jQuery

BootstrapMsg is a jQuery plugin for displaying messages with Bootstrap alert classes to generate hierarchical in-page navigation for an extended webpage sectioned by heading components. Using Bootstrap…

jquery-google-chart-plugin

jQuery Plugin for Transforming HTML Tables Into Charts Using Google Charts

Chartinator is a jQuery plugin for converting HTML tables, Google Sheets and js arrays into charts using Google Charts. Use data from HTML tables Chartinator is designed…

Leave a Reply

Your email address will not be published. Required fields are marked *