1$(function ($) { 2 var boxesState = JSON.parse(intelli.cookie.read('boxesState')); 3 if (typeof boxesState == 'undefined' || boxesState == null) { 4 boxesState = {}; 5 } 6 7 $('.collapsible').each(function () { 8 var blockId = $(this).attr('id'); 9 10 if (!$('.minmax-toggle', this).length > 0) { 11 $('.box__caption, > .fieldset__header', this).append('<a href="#" class="minmax-toggle"><i></i></a>'); 12 } 13 14 if (boxesState[blockId] == 'visible') { 15 $(this).removeClass('collapsed'); 16 } 17 else if (boxesState[blockId] == 'hidden') { 18 $(this).addClass('collapsed'); 19 } 20 }); 21 22 $('.minmax-toggle').on('click', function (e) { 23 e.preventDefault(); 24 25 var o = $(this).closest('.collapsible'); 26 var blockId = o.attr('id'); 27 28 if (o.hasClass('collapsed')) { 29 $('.box__content, > .fieldset__content', o).slideDown('fast', function () { 30 o.removeClass('collapsed'); 31 }); 32 33 boxesState[blockId] = 'visible'; 34 } 35 else { 36 $('.box__content, > .fieldset__content', o).slideUp('fast', function () { 37 o.addClass('collapsed'); 38 }); 39 40 boxesState[blockId] = 'hidden'; 41 } 42 43 intelli.cookie.write('boxesState', JSON.stringify(boxesState)); 44 }); 45});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.