I'm trying to learn about cookies in js, followed one tutorial and everything went smoothly but I wish to set expired date for 1 day. If I just write {expired: 1} It. somehow is 22h, I found on forum example like :
var date = new Date();
            var expired = '';
            date.setTime(date.getTime() + 1);
            expired += date.toGMTString();
But It doesn't really work for me and doesn't show cookies at all when I try to do
{expires: expired}
Can you guys give me some hints how to set it for 24hours?
$('#accept').click(function () {
        if (!$('.change-message--on-click').is('hide--first')) {
            $('.change-message--on-click').removeClass('hide--second');
            $('.change-message--on-click').addClass('hide--first');
            var date = new Date();
            var expired = '';
            date.setTime(date.getTime() + 1);
            expired += date.toGMTString();
            $.cookie('choosen-Accept', 'yes', {expires: 1 });
        }
    return false