"Cookie"
Bootstrap 4.1.1 Snippet by cadurocha

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div id="cookie_directive_container" class="container" style="display: none"> <nav class="navbar navbar-default navbar-fixed-bottom"> <div class="container"> <div class="navbar-inner navbar-content-center" id="cookie_accept"> <a href="#" class="btn btn-default pull-right">Close</a> <p class="text-muted credit"> By using our website you are consenting to our use of cookies in accordance with our <a href="/cookies">cookie policy</a>. </p> <br> </div> </div> </nav> </div>
#cookie_directive_container { display: none; } #cookie_directive_container { background-color: #000000; color: #FFFFFF; height: 40px; padding: 10px 0; position: relative; text-align: center; width: 100%; z-index: 200; top: 0; } #cookie_note a, #cookies_used a{ color: #ffffff; font-style: italic; } #cookie_directive_container ul li { display: inline; padding-left: 30px; padding-right: 30px; font-size:12px; } #cookie_accept { border-right: 1px solid; border-left: 1px solid; } #cookie_accept a { background-color: #FC0; color: #000000; padding: 4px; text-decoration: none; border-radius:3px; }
jQuery(function($) { checkCookie_eu(); function checkCookie_eu() { var consent = getCookie_eu("cookies_consent"); if (consent == null || consent == "" || consent == undefined) { // show notification bar $('#cookie_directive_container').show(); } } function setCookie_eu(c_name,value,exdays) { var exdate = new Date(); exdate.setDate(exdate.getDate() + exdays); var c_value = escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString()); document.cookie = c_name + "=" + c_value+"; path=/"; $('#cookie_directive_container').hide('slow'); } function getCookie_eu(c_name) { var i,x,y,ARRcookies=document.cookie.split(";"); for (i=0;i<ARRcookies.length;i++) { x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("=")); y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1); x=x.replace(/^\s+|\s+$/g,""); if (x==c_name) { return unescape(y); } } } $("#cookie_accept a").click(function(){ setCookie_eu("cookies_consent", 1, 30); }); });#cookie_directive_container { display: none; } #cookie_directive_container { background-color: #000000; color: #FFFFFF; height: 40px; padding: 10px 0; position: relative; text-align: center; width: 100%; z-index: 200; top: 0; } #cookie_note a, #cookies_used a{ color: #ffffff; font-style: italic; } #cookie_directive_container ul li { display: inline; padding-left: 30px; padding-right: 30px; font-size:12px; } #cookie_accept { border-right: 1px solid; border-left: 1px solid; } #cookie_accept a { background-color: #FC0; color: #000000; padding: 4px; text-decoration: none; border-radius:3px;

Related: See More


Questions / Comments:

adrianojm2 () - 2 years ago - Reply 0