How to Create a Simple Cookie Banner Consent Using Bootstrap 4

Cookie Consent Popup Javascript – Quick and simple tutorial for creating a simple Bootstrap cookie banner. Bootstrap Cookie Banner demo website. If you don’t see the cookie banner below, clear your local storage.

If you have a website or blog with people visiting or likely to visit from the EU, you will need a cookie warning or popup notification.

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

How to make use of it:

1. Load the Cookie Banner plugin’s JavaScript and CSS into your Bootstrap website.

<link rel="stylesheet" href="/path/to/cdn/bootstrap.min.css"> <script src="/path/to/cdn/jquery.slim.min.js"></script> <script src="/path/to/cdn/bootstrap.min.js"></script> 
<link rel="stylesheet" href="./src/cookie-banner.css"> <script async="" src="./src/cookie-banner.js"></script>

2. Add a cookie consent message to the accept cookies banner.

<div class="nk-cookie-banner alert alert-dark text-center mb-0" role="alert">
  🍪 This website uses cookies to ensure you get the best experience on our website.
  <a href="/privacy/" target="blank" rel="noopener noreferrer">Learn more</a>
  <button type="button" class="btn btn-primary btn-sm ml-3" onclick="window.nk_hideCookieBanner()">
    I Got It
  </button>
</div>

Read More – A Modal Dialog Bootstrap Cookie Banner Consent Settings and Framework

3. Override the default kinds of the cookie consent banner.

.nk-cookie-banner {
  position: fixed;
  bottom: 0px;
  left: 0px;
  width: 100%;
  z-index: 999;
  border-radius: 0px;
  display: none;
}

See Also –

Cookie Consent Module for Angular | ngx-cookieconsent
Automatic GDPR Cookies Banner for Google Analytics & Facebook Pixel | GlowCookies
Create a Cookie Notice with Vanilla JavaScript | CookieNoticeJS


See Demo And Download

Cookie-Consent-Using-Bootstrap

Official Website(kolappannathan): Click Here

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

Related Posts

Accessible-Bootstrap-4-Accordion

Accessible Bootstrap 4 Accordion With jQuery Plugin

Accessible Bootstrap 4, an easy-to-use accordion component for BS4 makes it easy to navigate accordion panels. It includes features intended to help users understand that the accordion…

jquery-envato-preview-plugin

Component with jQuery Image Previewer Plugin | Envato Preview

jQuery Envato Preview is a plug-in that attaches a tooltip-style rich text preview to an element when hovered over it. It also appears on Envato Networks such…

grid-accordion-jquery-plugin

A Responsive, Touch-Enabled jQuery Grid Accordion Component

Grid Accordion jQuery plugin is a responsive, touch-enabled jQuery grid accordion plugin that combines grid and accordion functionality. Use it to create a responsive grid where you…

responsive-neon-glass-cards

Responsive Card Neon Glass HTML & CSS

Responsive Neon Glass Cards are beautiful neon glass cards using HTML and CSS with animation effects. Don’t forget to join the channel for more videos like this…

bootstrap5-tags

[Multiple] Replace Select With The Nices Icons | Bootstrap5-Tags

bootstrap5-tags is a Vanilla JavaScript (ES6) extension for Bootstrap 5 that turns a multi-select box into an easy-to-use tag-input component. An original ES6 alternative to choose from…

Keyboard-CSS

Creating Keyboard Shortcuts Buttons With Style | Keyboard.css

CSS Keyboard is a library of ready-to-use, browser-compatible keyboards as a UI button for use in your web projects. This CSS library helps you create keyboard-like buttons…

Leave a Reply

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