An open API service indexing awesome lists of open source software.

https://github.com/b13/js-cookiebanner


https://github.com/b13/js-cookiebanner

Last synced: 10 months ago
JSON representation

Awesome Lists containing this project

README

          

js-cookieBanner
===================

Lightweight javascript cookie banner plugin

### Default use

window.cookieBanner(options);

### Use as AMD module
require(['js-cookieBanner'], function(cookieBanner) {
new cookieBanner(options);
});

### Default options

options = {
// html cookie banner container
htmlContainer: '

' +
'
' +
'
' +
'
' +
'
' +
'
'

// html cookie banner content
// will append to #bJS_cookieBannerContent
, htmlContent: '

We use cookies on this site to enhance your user experience

' +
'more infosaccept'

// cookie name
, cookieName: "cookieBanner"

// cookie timeout: 13 months in milliseconds
, cookieTimeout: 33696000000

// banner position
// can be "bottom" || "top"
, position: "bottom"

// deploy to show cookie banner
, delay: 600

// selectors
, selectors: {
cookieBanner : '#bJS_cookieBanner'
, acceptCookieBanner : '.bJS_acceptCookieBanner'
}
// class names
, classNames: {
positionTop : "b_cookieBannerPosition-top"
, positionBottom : "b_cookieBannerPosition-bottom"
}
// states
, states: {
active : "b_cookieBannerActive"
}
}