You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>Make sure you then include the following line of code within $(document).ready():</p>
35
+
<code>
36
+
$.cookieBar();
37
+
</code>
38
+
<p>If you find that the bar appears even after accepting/declining, make sure "forceShow" is set to <strong>false</strong>.</p>
39
+
<p>For more information about PrimeBox's CookieBar plugin, go to <ahref="http://www.primebox.co.uk/projects/cookie-bar/">www.primebox.co.uk/projects/cookie-bar/</a>.</p>
* This work is licensed under the Creative Commons
5
+
* Attribution 3.0 Unported License. To view a copy
6
+
* of this license, visit
7
+
* http://creativecommons.org/licenses/by/3.0/.
8
+
*
9
+
* Documentation available at:
10
+
* http://www.primebox.co.uk/projects/cookie-bar/
11
+
*
12
+
* When using this software you use it at your own risk. We hold
13
+
* no responsibility for any damage caused by using this plugin
14
+
* or the documentation provided.
15
+
*/
16
+
(function($){
17
+
$.cookieBar=function(options,val){
18
+
if(options=='cookies'){
19
+
vardoReturn='cookies';
20
+
}elseif(options=='set'){
21
+
vardoReturn='set';
22
+
}else{
23
+
vardoReturn=false;
24
+
}
25
+
vardefaults={
26
+
message: 'We use cookies to track usage and preferences.',//Message displayed on bar
27
+
acceptButton: true,//Set to true to show accept/enable button
28
+
acceptText: 'I Understand',//Text on accept/enable button
29
+
acceptFunction: function(cookieValue){if(cookieValue!='enabled'&&cookieValue!='accepted')window.location=window.location.href;},//Function to run after accept
30
+
declineButton: false,//Set to true to show decline/disable button
31
+
declineText: 'Disable Cookies',//Text on decline/disable button
32
+
declineFunction: function(cookieValue){if(cookieValue=='enabled'||cookieValue=='accepted')window.location=window.location.href;},//Function to run after decline
33
+
policyButton: false,//Set to true to show Privacy Policy button
34
+
policyText: 'Privacy Policy',//Text on Privacy Policy button
35
+
policyURL: '/privacy-policy/',//URL of Privacy Policy
36
+
autoEnable: true,//Set to true for cookies to be accepted automatically. Banner still shows
37
+
acceptOnContinue: false,//Set to true to accept cookies when visitor moves to another page
38
+
acceptOnScroll: false,//Set to true to accept cookies when visitor scrolls X pixels up or down
39
+
acceptAnyClick: false,//Set to true to accept cookies when visitor clicks anywhere on the page
40
+
expireDays: 365,//Number of days for cookieBar cookie to be stored for
41
+
renewOnVisit: false,//Renew the cookie upon revisit to website
42
+
forceShow: false,//Force cookieBar to show regardless of user cookie preference
43
+
effect: 'slide',//Options: slide, fade, hide
44
+
element: 'body',//Element to append/prepend cookieBar to. Remember "." for class or "#" for id.
45
+
append: false,//Set to true for cookieBar HTML to be placed at base of website. Actual position may change according to CSS
46
+
fixed: false,//Set to true to add the class "fixed" to the cookie bar. Default CSS should fix the position
47
+
bottom: false,//Force CSS when fixed, so bar appears at bottom of website
48
+
zindex: '',//Can be set in CSS, although some may prefer to set here
49
+
domain: String(window.location.hostname),//Location of privacy policy
50
+
referrer: String(document.referrer)//Where visitor has come from
0 commit comments