Hi, I have a code that stores a cookie for a day when the modal is closed which works but I also want to add the code where once I submit form it stores a cookie forever but it doesn’t work. below is the code(it works with the submit part as comment).
<script>
//modal cookie
var cookieName = 'modalClosed';
if(typeof Cookies.get(cookieName) !== 'undefined'){
$('.signup_component').remove();
}
//$('.signup_form-block').submit(()=>{
//Cookies.set(cookieName, 'forever', { expires: 360 })
//$('.signup_component').remove();
$('.signup_close-button, .signup_background-overlay').on('click', function(){
Cookies.set(cookieName, 'stored', { expires: 1});
})
</script>
Here is my site Read-Only: LINK
(how to share your site Read-Only link)