I'm building a site that sets numerous cookies based on selections. The cookie updates and saves but when I navigate to another page the selections are not stored globally. I've tried using path: / and it only remembers the selections when I visit that page.
I'm storing a cookie that renders a list in a panel of selected options and its also stored in a hidden field.
I've got some code below, is the path in the correct place?
jQuery(document).ready(function () {
    jQuery("ul.activities_list").append(jQuery.cookie("listItem"), {
                expires: 7,
                path: '/'
            }); //<---end of $.cookie);
  jQuery(".activity").on("click", ".add_activity", function() {
   // jQuery(".add_activity").live('click',function () {
        var title = jQuery(this).parent().parent().find('.title').html();
        // Add activity item to the panel list.
        jQuery("ul.activities_list").prepend(jQuery('<li>'+title+'<button id="remove_item" class="button is-primary is-white">Remove</button></li>'));
        jQuery.cookie("listItem", ((jQuery.cookie("listItem") ? jQuery.cookie("listItem") : '') + jQuery('<li>'+title+'<button id="remove_item" class="button is-primary is-white">Remove</button></li></li>').clone().wrap('<div />').parent().html(), '/'));
        jQuery.cookie("listItemTitle", ((jQuery.cookie("listItemTitle") ? jQuery.cookie("listItemTitle") : ', ') + title));
   console.log(jQuery.cookie("listItem")) });
    jQuery("#remove_item").live('click',function () {
        jQuery(this).parent().remove();
        var removed_item = jQuery('.activities_list').html();
        jQuery.cookie("listItem", removed_item);
        jQuery.cookie("listItemTitle", removed_item);
    });
});```
 
    