Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You don't necessarily need to use a cookie; you can try storing the data using <a href="https://github.com/frankkohlhepp/store-js" rel="nofollow">store.js</a>, which encapsulates browser local storage and a few other methods to store data on the client side.</p> <pre><code>/* store.js groups your values into something called a store. Multiple stores are separated from each other. So let's make a new store: */ var settings = new Store("settings"); /* Just choose a name for the new store, and save it in a variable. Always remember to use the "new" keyword! Never leave it off! Now you can almost normally get, set and remove values: */ settings.set("color", "blue"); settings.set("enable_test1", true); settings.set("number_of_rainbows", 8); // and var color = settings.get("color"); // and settings.remove("color"); </code></pre> <p>...edit with code..</p> <pre><code> &lt;div id="cookiemsg"&gt;&lt;div id="cookiecenter"&gt;&lt;p&gt;This website places a Google Analytics cookie on your machine, this helps us collect anonymous information so that we can provide a better experiance for you. By using this site you imply your consent to this. For more information or to find out how you can remove this cookie please visit our privacy policy &lt;a href="#"&gt;HERE&lt;/a&gt; or if you are happy with this click &lt;a id="hide" href="#"&gt;HERE&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;!--end of cookiecenter--&gt;&lt;/div&gt;&lt;!--end of cookiemsg--&gt; </code></pre> <p>​</p> <blockquote> <p></p> </blockquote> <pre><code>$(function(){ var store = new Store("com.domain.page.store") var acceptedCookie = store.get("acceptedCookie"); if(typeof acceptedCookie == "undefined"){ //set a default acceptedCookie = false } if(!acceptedCookie){ $('#cookiemsg').slideDown('slow'); } $('#hide').click(function(){ $('#cookiemsg').slideUp('slow'); store.set("acceptedCookie", true); }); }); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload