I have a script which allows to save input value as a list: JsFiddle
So now Im trying to make an event which will delete a certain list if clicked on, of course the cookie should be destroyed. So I tried:
$('.jq-text li').click(function(e) {
$.cookie("myDemoCookie", null);
});
This should destroy the cookie but it doesn’t…
I saw your jsfiddle code, you are creating cookie with a path, so you’ll have to specify
pathwhen deleting cookie.Make sure you have read documentation of $.cookie.
Try following code: