Divas Cookies documentation

Thank you for your interest in our jQuery plugin!

If you have any questions that are beyond the scope of this help file, please feel free to email us writing to the email address below. Enjoy!

Version: 0.3
Created: May 7th 2015
By: Coding Divas [Federica Sibella & Michela Chiucini]
Email: support@codingdivas.net

Divas Cookies setup

Files to include (mandatory)

Remember to add these files in your <head> section.

<!-- Divas Cookies skin -->
<link rel="stylesheet" type="text/css" media="screen" href="path-to-css/divascookies_dark_top.css" />

<!-- your jQuery version -->
<script type="text/javascript" src="path-to-js/jquery-2.1.4.min.js"></script>

<!-- your Divas Cookies version -->
<script type="text/javascript" src="path-to-js/jquery.divascookies-0.3.min.js"></script>
				
				

Basic initialization (mandatory)

Just call Divas Cookies on document ready.

$(document).ready(function() {
	$.DivasCookies();
});				
				

Writing your own CSS for Divas Cookies

Here is a list of CSS classes created by Divas Cookies. You can style them as you wish or just link at one of our Divas Cookies skins, if you prefer.

/*
* Divas Cookies CSS classes
*/
.divascookies {
	// main container
}

.divascookies > .divascookies-banner-container {
	// banner container
}

.divascookies p.divascookies-banner-text {
	// banner text
}

span.divascookies-policy-link a {
	// link to the extended policy page
}

.divascookies-banner-container > .divascookies-accept-button-container {
	// container of the accept button
}

.divascookies-accept-button-container > .divascookies-accept-button-img {
	// container of the accept button img
}

.divascookies-accept-button-container > .divascookies-accept-button-text {
	// accept button text
}	
				
				

Divas Cookies configurable parameters

Divas Cookies can be configured to fit your needs with many straightforward parameters that you can set when calling the plugin.

bannerText (string)

It is the text for the Divas Cookies banner.
Default value: "This website uses cookies.". Configuration example:

$.DivasCookies({
	bannerText: "This website uses cookies."	
});					
				

cookiePolicyLink (string)

It is the link to your extended cookie policy.
Default value: "". Configuration example:

$.DivasCookies({
	cookiePolicyLink: "yourprivacy.html"	
});					
				

cookiePolicyLinkText (string)

It is the text for the link to the extended cookie policy.
Default value: "Read our cookie policy.". Configuration example:

$.DivasCookies({
	cookiePolicyLinkText: "More info."	
});					
				

thirdPartyPolicyWidget (string)

To be used with third party privacy policies, now active only for Iubenda policies. If set to "iubenda" tries to use the Iubenda widget.
Default value: "". Configuration example:

$.DivasCookies({
	thirdPartyPolicyWidget: "iubenda"	
});					
				

acceptButtonText (string)

It is the text for the acceptance button.
Default value: "Ok". Configuration example:

$.DivasCookies({
	acceptButtonText: "Ok, go ahead!"	
});					
				

acceptButtonSrc (string)

It is the source for the acceptance button image (optional).
Default value: "". Configuration example:

$.DivasCookies({
	acceptButtonText: "path-to-images/acceptButton.png"	
});					
				

openEffect (string)

It is the opening effect for Divas Cookies banner.
Default value: "". Accepted values: "fade", "slideUp", "slideDown", "slideLeft", "slideRight". Configuration example:

$.DivasCookies({
	openEffect: "fade"	
});					
				

openEffectDuration (integer)

It is the duration in msec for the opening effect of Divas Cookies banner.
Default value: 600. Configuration example:

$.DivasCookies({
	openEffectDuration: 1000	
});					
				

openEffectEasing (string)

It is the easing function for the opening effect of Divas Cookies banner.
Default value: "swing". Accepted values: "swing", "linear". Configuration example:

$.DivasCookies({
	openEffectEasing: "linear"	
});					
				

closeEffect (string)

It is the closing effect for Divas Cookies banner.
Default value: "". Accepted values: "fade", "slideUp", "slideDown", "slideLeft", "slideRight". Configuration example:

$.DivasCookies({
	closeEffect: "fade"	
});					
				

closeEffectDuration (integer)

It is the duration in msec for the closing effect of Divas Cookies banner.
Default value: 600. Configuration example:

$.DivasCookies({
	closeEffectDuration: 1000	
});					
				

closeEffectEasing (string)

It is the easing function for the closing effect of Divas Cookies banner.
Default value: "swing". Accepted values: "swing", "linear". Configuration example:

$.DivasCookies({
	closeEffectEasing: "linear"	
});					
				

saveUserPreferences (boolean)

If true, sets a cookie after the Divas Cookies is closed the first time and never shows it again.
Default value: true. Accepted values: true, false. Configuration example:

$.DivasCookies({
	saveUserPreferences: false // keeps showing the banner after the accept button has been clicked	
});					
				

debugMode (boolean)

If true, Divas Cookies options are checked and warnings are shown if it is the case (only for debug purposes, do not use in production environment).
Default value: false. Accepted values: true, false. Configuration example:

$.DivasCookies({
	debugMode: true
});