UNPKG

jquery-cookiebar

Version:
41 lines 2.02 kB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>CookieBar Example</title> <style type="text/css"> * {margin:0; padding:0; outline:0; border:0;} body {color:#444444; background:#ffffff; font-size:0.8em; font-family:Verdana,Geneva,Arial,Helvetica,sans-serif;} .container {width:960px; margin:0 auto;} h1, h2, h3, h4, h5, h6, p, ul, ol {padding:0.35em 0;} strong {font-weight:bold;} code {display:block; padding:6px; border:1px solid #bbbbbb; line-height:normal; font-size:1.3em; background:#fafafa; margin:0.35em 0;} </style> <link rel="stylesheet" type="text/css" href="jquery.cookiebar.css" /> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <script type="text/javascript" src="jquery.cookiebar.js"></script> <script type="text/javascript"> $(document).ready(function(){ $.cookieBar({ }); }); </script> </head> <body> <div class="container"> <h1>jQuery CookieBar example</h1> <p>This is an example showing the cookie bar's default settings.</p> <p>Ensure you have jQuery, jQuery CookieBar and jQuery CookieBar's CSS uploaded to your website and linked in the header of your website</p> <code> &lt;link rel="stylesheet" type="text/css" href="/css-folder/jquery.cookiebar.css" /&gt;<br /> &lt;script type="text/javascript" src="/scripts-folder/jquery-1.7.1.min.js"&gt;&lt;/script&gt;<br /> &lt;script type="text/javascript" src="/scripts-folder/jquery.cookiebar.js"&gt;&lt;/script&gt; </code> <p>Make sure you then include the following line of code within $(document).ready():</p> <code> $.cookieBar(); </code> <p>If you find that the bar appears even after accepting/declining, make sure "forceShow" is set to <strong>false</strong>.</p> </div> </body> </html>