PageSourceSearch

https://www.tapestry.com/wp-content/themes/bootscore-main/js/theme.js?ver=202609302141

js tapestry.com collected 2026-10-02 03:12:39 UTC 4,284 bytes, 109 lines download raw bytes

1/*--------------------------------------------------------------
2>>> TABLE OF CONTENTS:
3----------------------------------------------------------------
41.  Header
52.  Theme
6--------------------------------------------------------------*/
7
8/*--------------------------------------------------------------
91. Header
10--------------------------------------------------------------*/
11
12jQuery(function ($) {
13  // Hide offcanvas menu in navbar and enable body scroll on resize through the breakpoints
14  $(window).on('resize', function () {
15    $('.navbar .offcanvas').offcanvas('hide');
16  });
17
18  // Close offcanvas on click a, keep .dropdown-menu open
19  $('.offcanvas a:not(.dropdown-toggle):not(a.remove_from_cart_button), a.dropdown-item').on('click', function () {
20    $('.offcanvas').offcanvas('hide');
21  });
22
23  // Dropdown menu animation
24  // Add slideDown animation to Bootstrap dropdown when expanding.
25  $('.dropdown').on('show.bs.dropdown', function () {
26    $(this).find('.dropdown-menu').first().stop(true, true).slideDown();
27  });
28
29  // Add slideUp animation to Bootstrap dropdown when collapsing.
30  $('.dropdown').on('hide.bs.dropdown', function () {
31    $(this).find('.dropdown-menu').first().stop(true, true).slideUp();
32  });
33
34  // Search collapse button hide if empty
35  if ($('#collapse-search').children().length == 0) {
36    $('.top-nav-search-md, .top-nav-search-lg').remove();
37  }
38
39  // Searchform focus
40  $('#collapse-search').on('shown.bs.collapse', function () {
41    $('.top-nav-search input:first-of-type').focus();
42  });
43
44  // Close collapse if searchform loses focus
45  $('.top-nav-search input:first-of-type').focusout(function () {
46    $('#collapse-search').collapse('hide');
47  });
48}); // jQuery End
49
50/*--------------------------------------------------------------
512. Theme
52--------------------------------------------------------------*/
53
54jQuery(function ($) {
55  // Smooth Scroll. Will be removed when Safari supports scroll-behaviour: smooth (Bootstrap 5).
56  $(function () {
57    $('a[href*="#"]:not([href="#"]):not(a.comment-reply-link):not([href="#tab-reviews"]):not([href="#tab-additional_information"]):not([href="#tab-description"]):not([href="#reviews"]):not([href="#carouselExampleIndicators"]):not([data-smoothscroll="false"])').click(function () {
58      if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
59        var target = $(this.hash);
60        target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
61        if (target.length) {
62          // Change your offset according to your navbar height
63          $('html, body').animate({ scrollTop: target.offset().top - 55 }, 1000);
64          return !1;
65        }
66      }
67    });
68  });
69
70  // Scroll to ID from external url. Will be removed when Safari supports scroll-behaviour: smooth (Bootstrap 5).
71  if (window.location.hash) scroll(0, 0);
72  setTimeout(function () {
73    scroll(0, 0);
74  }, 1);
75  $(function () {
76    $('.scroll').on('click', function (e) {
77      e.preventDefault();
78      // Change your offset according to your navbar height
79      $('html, body').animate({ scrollTop: $($(this).attr('href')).offset().top - 55 }, 1000, 'swing');
80    });
81    if (window.location.hash) {
82      // Change your offset according to your navbar height
83      $('html, body').animate({ scrollTop: $(window.location.hash).offset().top - 55 }, 1000, 'swing');
84    }
85  });
86
87  // Scroll to top Button
88  $(window).on('scroll', function () {
89    var scroll = $(window).scrollTop();
90
91    if (scroll >= 500) {
92      $('.top-button').addClass('visible');
93    } else {
94      $('.top-button').removeClass('visible');
95    }
96  });
97
98  // div height, add class to your content
99  $('.height-50').css('height', 0.5 * $(window).height());
100  $('.height-75').css('height', 0.75 * $(window).height());
101  $('.height-85').css('height', 0.85 * $(window).height());
102  $('.height-100').css('height', 1.0 * $(window).height());
103
104  // Forms
105  $('select').addClass('form-select').removeClass('form-control'); // form-control is added to select by WooCommerce form filter
106
107  // Alert links
108  $('.alert a').addClass('alert-link');
109}); // jQuery End

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.