1/*hover top products*/ 2$(document).on("mouseenter", ".basket-link:not(.basket):not(.counter-state--empty)", function () { 3 if (window.matchMedia("(min-width: 992px)").matches) { 4 const _this = $(this); 5 const $wrapper = _this.parent(); 6 7 let $hover_block = $wrapper.find(".basket_hover_block"); 8 let type = _this.hasClass("compare") ? "compare" : "favorite"; 9 let obParams = { 10 type: type, 11 }; 12 13 if (!$hover_block.length) { 14 $hover_block = $( 15 '<div class="basket_hover_block loading_block1 loading_block_content1 dropdown-' + type + '"></div>' 16 ); 17 $hover_block.appendTo($wrapper); 18 } 19 20 if (!$hover_block.hasClass("loaded")) { 21 BX.ajax 22 .runAction("aspro:max.DropdownProducts.show", { 23 data: { 24 params: obParams, 25 }, 26 }) 27 .then( 28 (response) => { 29 $hover_block.addClass("loaded"); 30 $hover_block.html(response.data.html); 31 }, 32 (response) => { 33 console.log("error"); 34 } 35 ); 36 } 37 } 38}); 39 40$(document).on("click", ".dropdown-product__items .remove-cell", function () { 41 let _this = $(this); 42 let itemAction = JItemAction.factory(this); 43 itemAction.state = false; 44 45 _this.css("pointer-events", "none"); 46 47 _this.closest(".dropdown-product__item").fadeOut(400, function () { 48 let parentWrap = _this.closest(".basket_hover_block"); 49 let visibleItems = parentWrap.find(".dropdown-product__item:visible"); 50 51 $(this).remove(); 52 if (!visibleItems.length) { 53 parentWrap.html(""); 54 } 55 }); 56 itemAction.updateState(); 57}); 58/**/
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.