jquery-cookie-alerter

Mobile first jquery alert component for cookie acceptation


Keywords
jquery, cookies, cookie, message, alert, siliconsalad, mobile, javascript
License
MIT
Install
bower install jquery-cookie-alerter

Documentation

jquery-cookie-alerter

Why ?

To be in compliance with the "Cookies" CNIL recommendation

Illustration for Mobile first cookie alerter

Features
  • Content is injected with JavaScript for seo-friendly
  • Mobile first
  • Options for custom text and translations
Preprocessing
Tools

Getting Started

$ bundle
$ middleman server
$ middleman build

Installation

Use

  AlertLaw.start();

If you want to have a custom message you have some options available :

  AlertLaw.start({
    cookieUrl:      "path/to/info-page.html",
    messageTitle:   "Cookies",
    messageContent: {
      fr: "En poursuivant votre navigation sur notre site, vous en acceptez (...) et réaliser des statistiques de visites.",
      en: "By continuing your visit to our site, you agree to (...) and make visits statistics."
    },
    findOutMore:    "Find out more",
    cookieName:     "cookies_law",
  });

cookieUrl, findOutMore, messageContent and messageTitle can be a String or an Object including each translation.

Demo

Want to see the result ? Visit the demo page

License

Licensed under MIT license.