PageSourceSearch

https://www.psafe.com/wp-content/themes/tonykuehn/assets/js/menu.js

js psafe.com collected 2026-09-24 09:54:48 UTC 4,182 bytes, 126 lines download raw bytes

1( function($) {
2  // Mobile menu toggle
3  $('.menu-toggle').on('click', function(e) {
4    e.preventDefault();
5    $('.menu-toggle .svg-inline--fa').toggleClass('hide');
6    $('.site-menu-dropdown').slideToggle(700);
7  });
8
9  // Mobile menu
10  $('.dropdown-menu > .menu-item-has-children > a').on('click', function(e) {
11    e.preventDefault();
12    $this = $(this);
13    $this.parent().toggleClass('open').siblings().removeClass('open');
14    $this.parent().find('.sub-menu').slideToggle(700);
15    $this.parent().siblings().find('.sub-menu').slideUp(700);
16  });
17
18  $('.vertical-sub-menu li.menu-item-has-children > a').on('click', function(e){
19    e.preventDefault();
20    $(this).parent().toggleClass('open');
21  });
22
23  var $window = $(window);
24  var windowWidth = $window.width();
25  var windowHeight = $window.height();
26
27  if (windowHeight < 769 && windowWidth > 641) {
28    if ( $('.slide-logo').length ) {
29      $('.slide-logo').css('top', '18%');
30    }
31    if ( $('.prod-title-wrapper').length ) {
32      $('.prod-title-wrapper').css('margin-top', '20%');
33      $('.prod-logo-wrapper').css('margin-bottom', '25px');
34    }
35  }
36
37  if (windowWidth < 641) {
38
39    // Help docs menu toggle
40    $('.help-product-title').click(function(){
41        $('.help-cats-list').toggle();
42    });
43
44    // Price grid toggle
45    $('.price-title').on('click', function(e) {
46      $(this).parent().toggleClass('active');
47      $(this).parents('.price-column').siblings().find('.p-col-inner').removeClass('active');
48      $(this).parent().find('.price-col-inner').toggle('medium');
49      $(this).parents('.price-column').siblings().find('.price-col-inner').hide('medium');
50    });
51
52    $('.head-item > a').on('click', function(e) {
53      e.preventDefault();
54      $(this).parent().toggleClass('open');
55      $(this).parent().find('.sub-menu').toggle('medium');
56      $(this).parent().siblings().find('.sub-menu').hide('medium');
57      $(this).parent().siblings().removeClass('open');
58    });
59
60    // Floating store buttons
61    var userAgent = navigator.userAgent || navigator.vendor || window.opera;
62    if (/android/i.test(userAgent)) {
63      if ( $('.play-download').length ) {
64        $('.download-button-wrapper').removeClass('hide');
65        $('.play-download').removeClass('hide');
66      } else if ( $('.both-download').length ) {
67        $('.download-button-wrapper').removeClass('hide');
68        $('.both-download').removeClass('hide');
69      }
70    }
71
72    // iOS detection from: http://stackoverflow.com/a/9039885/177710
73    if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
74      if ( $('.app-download').length ) {
75        $('.download-button-wrapper').removeClass('hide');
76        $('.app-download').removeClass('hide');
77      } else if ( $('.both-download').length ) {
78        $('.download-button-wrapper').removeClass('hide');
79        $('.both-download').removeClass('hide');
80      }
81    }
82
83  }
84
85  // Form placeholders
86  // Test for placeholder support
87    $.support.placeholder = (function(){
88        var i = document.createElement('input');
89        return 'placeholder' in i;
90    })();
91
92    // Hide labels by default if placeholders are supported
93    if($.support.placeholder) {
94        $('.site-footer .gform_wrapper .top_label .gfield_label').each(function(){
95            $(this).addClass('hide');
96        });
97
98        // Code for adding/removing classes here
99        $('.site-footer .gform_wrapper').find('input, textarea').on('keyup blur focus', function(e){
100
101            // Cache our selectors
102            var $this = $(this),
103                $parent = $this.parents('.gfield').find("label");
104
105						switch(e.type) {
106							case 'keyup': {
107								 $parent.toggleClass('hide', $this.val() == '');
108							} break;
109							case 'blur': {
110								if( $this.val() == '' ) {
111                    $parent.addClass('hide');
112                } else {
113                    $parent.removeClass('hide').addClass('js-unhighlight-label');
114                }
115							} break;
116							case 'focus': {
117								if( $this.val() !== '' ) {
118                    $parent.removeClass('js-unhighlight-label');
119                }
120							} break;
121							default: break;
122						}
123        });
124    }
125
126} ) ( jQuery );

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.