PageSourceSearch

https://petra.by/bitrix/templates/aspro_max/components/bitrix/news.list/front_lookbooks/script.js

js petra.by collected 2026-10-04 08:34:06 UTC 3,244 bytes, 106 lines download raw bytes

1BX.ready(function () {
2  $(".lookbooks .flexslider .js-click").click(function () {
3    var _this = $(this),
4      block = "",
5      activeBlock = _this.closest(".lookbook-wrapper").find(".lookbook.lookbook--active");
6
7    if (_this.hasClass("flex-prev")) {
8      activeBlock.fadeOut(function () {
9        $(this).removeClass("lookbook--active");
10        block = activeBlock.prev(".lookbook");
11        if (block.length) {
12          block.fadeIn(function () {
13            $(this).addClass("lookbook--active");
14          });
15        } else {
16          _this
17            .closest(".lookbook-wrapper")
18            .find(".lookbook:last-of-type")
19            .fadeIn(function () {
20              $(this).addClass("lookbook--active");
21            });
22        }
23      });
24    } else {
25      activeBlock.fadeOut(function () {
26        $(this).removeClass("lookbook--active");
27
28        block = activeBlock.next(".lookbook");
29        if (block.length) {
30          block.fadeIn(function () {
31            $(this).addClass("lookbook--active");
32          });
33        } else {
34          _this
35            .closest(".lookbook-wrapper")
36            .find(".lookbook:eq(0)")
37            .fadeIn(function () {
38              $(this).addClass("lookbook--active");
39            });
40        }
41      });
42    }
43  });
44  var slideText = $(".lookbook__info-toggle:first").text();
45  $(".lookbook__info-toggle").click(function () {
46    var _this = $(this),
47      slideBlock = _this.closest(".lookbook__info").find(".lookbook__info-text-more");
48    if (slideBlock.is(":visible")) {
49      _this.text(slideText);
50      slideBlock.parent().removeClass("clicked");
51    } else {
52      _this.text(_this.data("hide"));
53      slideBlock.parent().addClass("clicked");
54    }
55    slideBlock.slideToggle();
56  });
57  loadScrollTabs(".lookbooks .tabs-wrapper", () => {
58    $(".lookbooks .tabs-wrapper").scrollTab({
59      tabs_wrapper: "ul.tabs",
60      arrows_css: {
61        top: "-1px",
62      },
63      onResize: function (options) {
64        var top_wrapper = options.scrollTab.closest(".top_block");
65        if (top_wrapper.length) {
66          var tabs_wrapper = top_wrapper.find(".right_block_wrapper .tabs-wrapper");
67
68          if (window.matchMedia("(max-width: 767px)").matches) {
69            tabs_wrapper.css({
70              width: "100%",
71              "max-width": "",
72            });
73            return true;
74          }
75
76          var title = top_wrapper.find("h3");
77          var right_link = top_wrapper.find(".right_block_wrapper > a");
78          var all_width = top_wrapper[0].getBoundingClientRect().width;
79
80          if (title.length) {
81            all_width -= title.outerWidth(true);
82          }
83
84          if (right_link.length) {
85            all_width -= right_link.outerWidth(true);
86          }
87
88          all_width -= Number.parseInt(tabs_wrapper.css("margin-right"));
89
90          tabs_wrapper.css({
91            "max-width": all_width,
92            width: "",
93          });
94        }
95        options.width = all_width;
96      },
97    });
98  });
99});
100
101BX.addCustomEvent(window, "clickedTabsLi", function (e) {
102  if ($(".lookbook-wrapper").length && !e.target.hasClass("clicked")) {
103    $(".lookbook-wrapper").hide();
104    $(".lookbook-wrapper:eq(" + e.index + ")").show();
105  }
106});

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.