hi i am creating popup plugin in wordpress
. For that i want to set cookie when the user click on submit button so the user when reload the page the popup will not show again and again until the cookie is not remove. This is my jQuery code
$( "#sfpsubmit" ).click(function() {
$.cookie("sfpopup", "sf_popup", { expires: 1 });
});
if ($.cookie('sf_popup')) {
$('#myModal').modal('hide');
}
else{
setTimeout(function(){
$('#myModal').modal('show');
}, 3000);
}
I don't know how to set cookie using jQuery
in WordPress so i am using this way