PageSourceSearch

https://i-store.by/local/templates/aspro-premier/js/autoload/section-toggle.js?17483460141832

js i-store.by collected 2026-10-02 17:41:20 UTC 1,832 bytes, 61 lines download raw bytes

1BX.Aspro.Utils.readyDOM(() => {
2  const $sectionToggleLabel = $("section.toggle > label");
3
4  const previewParentClosedHeight = 25;
5  let previewParentAnimateHeight = 0;
6
7  $sectionToggleLabel.prepend($("<i />").addClass("fa fa-plus"));
8  $sectionToggleLabel.prepend($("<i />").addClass("fa fa-minus"));
9  $("section.toggle.active > p").addClass("preview-active");
10  $("section.toggle.active > div.toggle-content").slideDown(350, function () {});
11
12  $sectionToggleLabel.click(function (e) {
13    const $parentSection = $(this).parent();
14    const $parentWrapper = $(this).parents("div.toogle");
15
16    if (
17      $parentWrapper.hasClass("toogle-accordion")
18      && typeof e.originalEvent !== "undefined"
19    ) {
20      $parentWrapper.find("section.toggle.active > label").trigger("click");
21    }
22
23    $parentSection.toggleClass("active");
24
25    // preview paragraph
26    let $previewParent;
27    if ($parentSection.find("> p").get(0)) {
28      $previewParent = $parentSection.find("> p");
29      $previewParent.css("height", "auto");
30      $previewParent.css("height", $previewParent.css("height"));
31
32      previewParentAnimateHeight = $previewParent.css("height");
33    }
34
35    // content
36    const $toggleContent = $parentSection.find("> div.toggle-content");
37    if ($parentSection.hasClass("active")) {
38      $($previewParent).animate(
39        {
40          height: previewParentAnimateHeight,
41        },
42        350,
43        function () {
44          $(this).addClass("preview-active");
45        }
46      );
47      $toggleContent.slideDown(350, function () {});
48    } else {
49      $($previewParent).animate(
50        {
51          height: previewParentClosedHeight,
52        },
53        350,
54        function () {
55          $(this).removeClass("preview-active");
56        }
57      );
58      $toggleContent.slideUp(350, function () {});
59    }
60  });
61});

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.