Кристиан,
сохранение на сутки, expires:
1,
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<script>
$(function() {
var nCount = $.cookie("user_count") != undefined ? $.cookie("user_count", Number) : 0;
function open() {
if (nCount % 2 != 0) {
$("#menuicon a:before").addClass("bchanged");
$("#menuicon a:after").addClass("achanged");
$("span").addClass("schanged")
} else {
$("#menuicon a:before").removeClass("bchanged");
$("#menuicon a:after").removeClass("achanged");
$("span").removeClass("schanged")
}
}
open();
$("#menuicon").click(function() {
nCount++;
$.cookie("user_count", nCount, {
expires: 1,
path: "/"
});
open()
})
});
</script>