Cookie Notification

This plugin displays a notification on the use of cookies
For the whole functionality of Cookie Notification, see documentation.

How to use

1. Load jQuery and include Cookie Notification plugin files
<script src="jquery.js" type="text/javascript"></script>
<script src="dist/cookie-notification.min.js" type="text/javascript"></script>
2. Call the plugin
<script type="text/javascript">
    $.wgCookiesNotification();
</script>

Examples

Customise notification text
Change the notification, link and button texts of the cookie notification plugin.
<script type="text/javascript"> 
    $.wgCookiesNotification({
        titleText: 'We use cookies.',
        acceptButton: 'OK',
        readMoreButton: 'Read more',
        cookiePolicyLink: 'https://webgadgets.net/pages/privacy-policy',
    }); 
</script>
View demo - Customise notification text
Change colors
Set colors for the cookie notification background, text, link and button.
<script type="text/javascript">
    $.wgCookiesNotification({
        backgroundColor:'#eee',
        color:'#3C3C3C',
        buttonBackgroundColor:'#f5f600',
        buttonColor:'#333',
        linkColor:'blue',
    }); 
</script>onon
View demo - Change colors
Change position
Change the position of the cookie notification. Available options - top, bottom, right, left.
The position of the notification element is fixed.
<script type="text/javascript">
    $.wgCookiesNotification({
        top:0,
        right:0,
        left:0,
    }); 
</script>
View demo - Change position
Set width
Set width of the cookie notification. In this example the cookie notification is position in the bottom right corner.
<script type="text/javascript">
    $.wgCookiesNotification({
        bottom:0,
        right:0,
        width:'300px'
    }); 
</script>
View demo - Set width
Github Download Documentation