I work with jQuery cookie plugin v 2.2.1 and set multiple value to name like this:
html:
<a href="#" id="<?= esc($product->id);?>" class="hvr-bounce-in wishlist">
<i class="icon-favorite_outline"></i>
</a>
js:
$('.wishlist').click(function() {
event.preventDefault();
var id = $(this).attr('id');
ids = Cookies.get("wishlist")
if (!ids)
Cookies.set('wishlist', id)
else
Cookies.set('wishlist', ids + "," + id)
});
output in cookie is:
61,58,95,105
Now I need to remove one value from this list like 58. How can I remove it?