template/copy/script/navigation/enhancednav.js
function deserializeNavState()
   {
      var navID = $('.navigation .nav-accordion-menu').data('nav-id');

      if (sessionStorage)
      {
         var checkboxMap = sessionStorage.getItem(navID + '-accordion-state');

         // If there is no data in session storage then create an empty map.
         if (checkboxMap == null) { checkboxMap = '{}'; }

         checkboxMap = JSON.parse(checkboxMap);

         $('.navigation .nav-accordion-menu').find('input[type="checkbox"]').each(function()
         {
            var checkboxValue = checkboxMap[$(this).attr('name')];
            if (typeof checkboxValue === 'boolean') { $(this).prop('checked', checkboxValue); }
         });
      }

      // Set navigation menu visible
      $('.navigation .nav-accordion-menu').removeClass('hidden');

      // Set navigation menu scroll bar from session state.
      if (sessionStorage)
      {
         var navScrollTop = sessionStorage.getItem(navID + '-scrolltop');
         if (typeof navScrollTop === 'string') { $('.navigation').prop('scrollTop', navScrollTop); }
      }
   }
function deserializeNavState()
   {
      var navID = $('.navigation .nav-accordion-menu').data('nav-id');

      if (sessionStorage)
      {
         var checkboxMap = sessionStorage.getItem(navID + '-accordion-state');

         // If there is no data in session storage then create an empty map.
         if (checkboxMap == null) { checkboxMap = '{}'; }

         checkboxMap = JSON.parse(checkboxMap);

         $('.navigation .nav-accordion-menu').find('input[type="checkbox"]').each(function()
         {
            var checkboxValue = checkboxMap[$(this).attr('name')];
            if (typeof checkboxValue === 'boolean') { $(this).prop('checked', checkboxValue); }
         });
      }

      // Set navigation menu visible
      $('.navigation .nav-accordion-menu').removeClass('hidden');

      // Set navigation menu scroll bar from session state.
      if (sessionStorage)
      {
         var navScrollTop = sessionStorage.getItem(navID + '-scrolltop');
         if (typeof navScrollTop === 'string') { $('.navigation').prop('scrollTop', navScrollTop); }
      }
   }
function deserializeNavState ( ) { var navID = $ ( '.navigation .nav-accordion-menu' ) . data ( 'nav-id' ) ; if ( sessionStorage ) { var checkboxMap = sessionStorage . getItem ( navID + '-accordion-state' ) ; // If there is no data in session storage then create an empty map. if ( checkboxMap == null ) { checkboxMap = '{}' ; } checkboxMap = JSON . parse ( checkboxMap ) ; $ ( '.navigation .nav-accordion-menu' ) . find ( 'input[type="checkbox"]' ) . each ( function ( ) { var checkboxValue = checkboxMap [ $ ( this ) . attr ( 'name' ) ] ; if ( typeof checkboxValue === 'boolean' ) { $ ( this ) . prop ( 'checked' , checkboxValue ) ; } } ) ; } // Set navigation menu visible $ ( '.navigation .nav-accordion-menu' ) . removeClass ( 'hidden' ) ; // Set navigation menu scroll bar from session state. if ( sessionStorage ) { var navScrollTop = sessionStorage . getItem ( navID + '-scrolltop' ) ; if ( typeof navScrollTop === 'string' ) { $ ( '.navigation' ) . prop ( 'scrollTop' , navScrollTop ) ; } } }
Deserializes navigation accordion state from session storage.
Deserializes navigation accordion state from session storage .