JSFiddle - React, Tailwind, and code Playground

HTML

<input type='button' value='btn' id='notify-comet' />
<div id='not-count'>test</div>

JavaScript

var x = readCookie('notCount')
if(x)
{
    $('#not-count').hide();
}

$('#notify-comet').on('click', function(e){
    if(!x)
    {
        setTimeout(function() {
            //I've set the 'notCount' cookie to expire in 1 minute. You can set it to 60 minutes
            createCookie('notCount', 'true', 1);
        	$('#not-count').fadeOut('fast');       
    	}, 5000);    	
    }
    
});

function createCookie(name,value,minutes) {
    if (minutes) {
        var date = new Date();
        date.setTime(date.getTime()+(minutes*60*1000));
        var expires = "; expires="+date.toGMTString();
    }
    else var expires = "";
    document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i < ca.length;i++) {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1,c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return null;
}