events/assets/js/js.js
/**
   * Bind the behaviour for selecting a view mode.
   */
Bind the behaviour for selecting a view mode.
Bind the behaviour for selecting a view mode .
function bindViewModeTabBehaviour() {
    jQuery('.' + CLASS_VIEW_MODE_TABS + ' a').once().on('click', function(e) {
      e.preventDefault();
      if (jQuery(this).hasClass(CLASS_ACTIVE)) {
        return;
      }
      var viewMode = jQuery(this).attr(ATTR_DATA_VIEW_MODE);
      setActiveTab(viewMode);
      jQuery.cookie(VIEW_MODE_COOKIE, viewMode, {expires: 365, path: '/'});
      $listWrapper.toggleClass(CLASS_LIST_VIEW);
      setTimeout(function() {
        Waypoint.refreshAll();
      }, 500);
    });
  }
function bindViewModeTabBehaviour ( ) { jQuery ( '.' + CLASS_VIEW_MODE_TABS + ' a' ) . once ( ) . on ( 'click' , function ( e ) { e . preventDefault ( ) ; if ( jQuery ( this ) . hasClass ( CLASS_ACTIVE ) ) { return ; } var viewMode = jQuery ( this ) . attr ( ATTR_DATA_VIEW_MODE ) ; setActiveTab ( viewMode ) ; jQuery . cookie ( VIEW_MODE_COOKIE , viewMode , { expires : 365 , path : '/' } ) ; $listWrapper . toggleClass ( CLASS_LIST_VIEW ) ; setTimeout ( function ( ) { Waypoint . refreshAll ( ) ; } , 500 ) ; } ) ; }
Bind the behaviour for selecting a view mode.
Bind the behaviour for selecting a view mode .
// Do not react if the current tab is active.
 // Get the chosen view mode.
 // Set the cookie for a year.
 // Toggle the list view class.
 // Refresh Waypoints, as the change in content heights affects things
 // like the sticky titles in results. Add a slight delay to allow any
 // animation/change in height to take effect.
