events/assets/js/js.js
// Add a saved events item to the cookie.

Add a saved events item to the cookie.
Add a saved events item to the cookie .
function addToCookie(id) {
    var currentSelection = getSavedEventsFromCookie()
    if (currentSelection.indexOf(id) < 0) {
      currentSelection.push(id);
      jQuery.cookie(COOKIE_SAVED_EVENTS, JSON.stringify(currentSelection), {expires: 365, path: '/', domain: '.barbican.org.uk'});
      updateSavedEventsCount();
    }
  }
function addToCookie ( id ) { var currentSelection = getSavedEventsFromCookie ( ) if ( currentSelection . indexOf ( id ) < 0 ) { currentSelection . push ( id ) ; jQuery . cookie ( COOKIE_SAVED_EVENTS , JSON . stringify ( currentSelection ) , { expires : 365 , path : '/' , domain : '.barbican.org.uk' } ) ; updateSavedEventsCount ( ) ; } }
Add a saved events item to the cookie.
Add a saved events item to the cookie .