PageSourceSearch

https://www.caffevergnano.com/wp-content/themes/gbs/js/scripts.js

js caffevergnano.com collected 2026-09-24 23:15:37 UTC 2,471 bytes, 62 lines download raw bytes

1/*sticky header*/
2jQuery(window).ready(function ($) {
3    jQuery(window).scroll(function () {
4        var scroll = jQuery(window).scrollTop();
5        var height_1 = jQuery("header.adhesive #navigation-bar").outerHeight(
6            true
7        );
8        if (jQuery("header.adhesive #action-bar").length > 0) {
9            var height_2 = jQuery("header.adhesive #action-bar").outerHeight(true);
10        } else {
11            var height_2 = 0;
12        }
13        var offset_header = height_1 + height_2;
14        if (scroll >= offset_header) {
15            jQuery("header.adhesive #navigation-bar").addClass("sticky");
16            jQuery("img.custom-logo.logo-sticky").removeClass("hidden");
17            jQuery("img.custom-logo.logo-default").addClass("hidden");
18        } else {
19            jQuery("header.adhesive #navigation-bar").removeClass("sticky");
20            jQuery("img.custom-logo.logo-sticky").addClass("hidden");
21            jQuery("img.custom-logo.logo-default").removeClass("hidden");
22        }
23        if (scroll >= offset_header && jQuery("header").not(".transparent")) {
24            jQuery("main").css("margin-top", offset_header); // Cambia padding-top a margin-top
25        } else if (
26            scroll < offset_header &&
27            jQuery("header").not(".transparent")
28        ) {
29            jQuery("main").css("margin-top", 0); // Restablece a 0
30        }
31    });
32});
33
34/*script apertura sottomenu*/
35jQuery(document).on(
36    "click",
37    "#sticky-navigation-bar nav#site-navigation ul li.menu-item-has-children",
38    function (e) {
39        if (jQuery(this).children(".sub-menu")) {
40            jQuery(this).toggleClass("active");
41        }
42    }
43);
44jQuery(document).ready(function () {
45    jQuery(".search-toggle").on("click", function () {
46        jQuery(this).parent().find(".search-container").slideToggle();
47    });
48});
49
50/*script tab*/
51jQuery(".tab-button").on("click", function () {
52    if(!jQuery(this).hasClass("tab-button-active")){
53        let tab = jQuery(this).attr("data-tab");
54        jQuery(this).parent().find(".tab-button-active").removeClass("tab-button-active");
55        jQuery(this).addClass("tab-button-active");
56        jQuery(this).parent().parent().parent().find(".tab-active").removeClass("tab-active");
57        jQuery(this).parent().parent().parent().find(".tab-"+tab).addClass("tab-active");
58        setTimeout(function () {
59            jQuery(".prod-card-content:visible").verticalTextAligner();
60        }, 500);
61    }
62});

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.