events/assets/js/js.js
// Remove a saved events item from the cookie.

Remove a saved events item from the cookie.
Remove a saved events item from the cookie .
function removeFromCookie(id) {
    var currentSelection = getSavedEventsFromCookie();
    var index = currentSelection.indexOf(id);
    if (index >= 0) {
      currentSelection.splice(index, 1);
      if (currentSelection.length > 0) {
        jQuery.cookie(COOKIE_SAVED_EVENTS, JSON.stringify(currentSelection), {expires: 365, path: '/', domain: '.barbican.org.uk'});
      }
      else {
        jQuery.removeCookie(COOKIE_SAVED_EVENTS, {path: '/', domain: '.barbican.org.uk'});
      }
      updateSavedEventsCount();
    }
  }
function removeFromCookie ( id ) { var currentSelection = getSavedEventsFromCookie ( ) ; var index = currentSelection . indexOf ( id ) ; if ( index >= 0 ) { currentSelection . splice ( index , 1 ) ; if ( currentSelection . length > 0 ) { jQuery . cookie ( COOKIE_SAVED_EVENTS , JSON . stringify ( currentSelection ) , { expires : 365 , path : '/' , domain : '.barbican.org.uk' } ) ; } else { jQuery . removeCookie ( COOKIE_SAVED_EVENTS , { path : '/' , domain : '.barbican.org.uk' } ) ; } updateSavedEventsCount ( ) ; } }
Remove a saved events item from the cookie.
Remove a saved events item from the cookie .
// If there are still items in the saved events, update the cookie.x
 // Remove the cookie.
