1$(document).ready(function() { 2 $('#categories_block_left.custommenu ul.tree .subcategoriesLi').removeClass('highlighted'); 3 4 if (typeof highlighted_category_id !== 'undefined') { 5 $('#categories_block_left.custommenu ul.tree a.cat_' + highlighted_category_id).parent('ul.tree .subcategoriesLi').addClass('highlighted'); 6 } 7 8 var mountDeferredTopMenuColumns = function() { 9 var $storage = $('#custommenu-top-deferred-storage'); 10 11 if (!$storage.length) { 12 return; 13 } 14 15 $storage.find('.custommenu-top-deferred-item').each(function() { 16 var $item = $(this); 17 var targetId = $item.data('custommenu-top-target'); 18 var $target = $('.custommenu-top-deferred-target[data-custommenu-top-target="' + targetId + '"]'); 19 20 if ($target.length) { 21 // move the live nodes (not re-parsed html) so bound handlers and cached refs survive 22 $target.replaceWith($item.children()); 23 } 24 }); 25 26 $storage.remove(); 27 }; 28 29 var mountDeferredMobileMenu = function() { 30 var $storage = $('#custommenu-mobile-deferred-storage'); 31 var $target = $('.custommenu-mobile-deferred-target'); 32 33 if (!$storage.length || !$target.length) { 34 return; 35 } 36 37 // move the live nodes (not re-parsed html) so bound handlers and cached refs survive 38 $target.replaceWith($storage.children()); 39 $storage.remove(); 40 }; 41 42 if ($('#custommenu-top-deferred-storage').length) { 43 if (window.requestIdleCallback) { 44 window.requestIdleCallback(function() { 45 mountDeferredTopMenuColumns(); 46 mountDeferredMobileMenu(); 47 }, { timeout: 1200 }); 48 } else { 49 window.requestAnimationFrame(function() { 50 window.setTimeout(function() { 51 mountDeferredTopMenuColumns(); 52 mountDeferredMobileMenu(); 53 }, 0); 54 }); 55 } 56 } 57});
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.