1$(document).ready(function () { 2 $(document).on( 3 "click", 4 ".header-menu__wide-submenu-item-inner .toggle_block", 5 function (e) { 6 e.preventDefault(); 7 const $menuContainer = e.target.closest( 8 ".header-menu__dropdown-menu-inner.header-menu__dropdown-menu--grids" 9 ); 10 const $parentContainer = e.target.closest(".header-menu__wide-limiter"); 11 const menuContainerCurrentWidth = $menuContainer.offsetWidth; 12 13 const _this = $(this), 14 $menu = _this 15 .closest(".header-menu__wide-submenu-item-inner") 16 .find("> .submenu-wrapper"); 17 18 if (!_this.hasClass("clicked")) { 19 _this.addClass("clicked"); 20 $menu.slideToggle({ 21 duration: 150, 22 done: function () { 23 _this.removeClass("clicked"); 24 }, 25 step: function () { 26 if (menuContainerCurrentWidth !== $menuContainer.offsetWidth) { 27 const paddingRight = window.getComputedStyle( 28 $parentContainer, 29 null 30 ).paddingRight; 31 $parentContainer.style.paddingRight = 32 parseInt(paddingRight) - 33 (menuContainerCurrentWidth - $menuContainer.offsetWidth) + 34 "px"; 35 } 36 }, 37 }); 38 39 _this 40 .closest(".header-menu__wide-submenu-item-inner") 41 .toggleClass("opened"); 42 } 43 } 44 ); 45 46 $(document).on( 47 "click", 48 ".header-menu__wide-submenu-item--more_items", 49 function (e) { 50 e.stopImmediatePropagation(); 51 52 const $menuContainer = e.target.closest( 53 ".header-menu__dropdown-menu-inner.header-menu__dropdown-menu--grids" 54 ); 55 const $parentContainer = e.target.closest(".header-menu__wide-limiter"); 56 const menuContainerCurrentWidth = $menuContainer.offsetWidth; 57 58 const _this = $(this), 59 bOpened = _this.hasClass("opened"), 60 childSpan = _this.find("span"), 61 childSvg = childSpan.find(".svg"), 62 parent = _this.closest(".header-menu__wide-submenu"), 63 collapsed = parent.find(".collapsed"), 64 useDelimetr = parent.hasClass("header-menu__wide-submenu--delimiter"), 65 lastSeparator = parent.find(".last-visible"); 66 67 const obAnimation = { 68 duration: 200, 69 step: function () { 70 if (menuContainerCurrentWidth !== $menuContainer.offsetWidth) { 71 const paddingRight = window.getComputedStyle( 72 $parentContainer, 73 null 74 ).paddingRight; 75 $parentContainer.style.paddingRight = 76 parseInt(paddingRight) - 77 (menuContainerCurrentWidth - $menuContainer.offsetWidth) + 78 "px"; 79 } 80 }, 81 }; 82 83 if (collapsed.length) { 84 if (useDelimetr) { 85 collapsed.fadeToggle(obAnimation); 86 87 if (lastSeparator.length) { 88 lastSeparator.fadeToggle(obAnimation); 89 } 90 } else { 91 collapsed.slideToggle(obAnimation); 92 } 93 94 childSpan.text(BX.message(bOpened ? "SHOW" : "HIDE")).append(childSvg); 95 96 _this.toggleClass("opened"); 97 } 98 } 99 ); 100});
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.