Press "Enter" to skip to content

A jQuery Plugin to Add a Cookie Consent Banner on a Website | Cookit

cookit.js is a small but configurable plugin for jQuery cookie consent to create a sticky bottom cookie bar to inform users about the use of cookies on your website and ask them to agree to accept cookies.

cookie popup jquery example, free cookie consent code html, cookie consent popup javascript, cookie consent javascript, accept cookies popup html, jquery cookie consent

How to make use of it:

1. Add jQuery library and the cookit.js plugin’s files to your website.

<link rel="stylesheet" href="/path/to/cookit.css" />
<script src="/path/to/cdn/jquery.min.js"></script>
<script src="/path/to/cookit.js"></script>

2. Initialize the plugin to generate a default cookie consent banner on the bottom of the webpage.

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

3. Customize the cookie consent messages.

$.cookit({
  messageText: "<b>Do you hungry ?</b> Pursuing navigation on this site, you accept the use of cookies.",
  linkText: "Learn more",
  linkUrl: "/privacy/",
  buttonText: "I accept"
});

4. Customize the looks of the cookie consent banner.

$.cookit({
  backgroundColor: '#1c1c1c',
  messageColor: '#fff',
  linkColor: '#fad04c',
  buttonColor: '#fad04c'
});

Sticky Cookie Accept Banner, Cookit Plugin/Github, bootstrap cookie consent, cookie banner javascript


See Demo And Download

Official Website(Athios-dev): Click Here

This superior jQuery/javascript plugin is developed by Athios-dev. For extra advanced usage, please go to the official website.

Be First to Comment

    Leave a Reply

    Your email address will not be published.