PageSourceSearch

https://pvgreencard.co.za/app/globals/assets/js/c5.js

js pvgreencard.co.za collected 2026-10-01 16:32:09 UTC 3,935 bytes, 157 lines download raw bytes

1
2$(function(){
3  'use strict'
4
5  feather.replace();
6
7  ////////// NAVBAR //////////
8
9  // Initialize PerfectScrollbar of navbar menu for mobile only
10  if(window.matchMedia('(max-width: 991px)').matches) {
11    const psNavbar = new PerfectScrollbar('#navbarMenu', {
12      suppressScrollX: true
13    });
14  }
15
16  // Showing sub-menu of active menu on navbar when mobile
17  function showNavbarActiveSub() {
18    if(window.matchMedia('(max-width: 991px)').matches) {
19      $('#navbarMenu .active').addClass('show');
20    } else {
21      $('#navbarMenu .active').removeClass('show');
22    }
23  }
24
25  showNavbarActiveSub()
26  $(window).resize(function(){
27    showNavbarActiveSub()
28  })
29
30  // Initialize backdrop for overlay purpose
31  $('body').append('<div class="backdrop"></div>');
32
33  //add popup for no links nav-link
34	$('.nav-link').on('click', function(e) {
35	  e.preventDefault();
36	  var slink = $(this).attr('href');
37	  var className = $(this).attr('class');
38
39	  if (className.includes('block-navigation')) {
40		$.alert({
41		  title: 'Access',
42		  icon: 'fa fa-warning',
43		  content: 'Your Access is limited to certain pages only. ',
44		});
45	  } else {
46		window.location.href = slink;
47	  }
48	});
49
50	
51	
52  // Showing sub menu of navbar menu while hiding other siblings
53  $('.navbar-menu .with-sub .nav-link').on('click', function(e){
54    e.preventDefault();
55    $(this).parent().toggleClass('show');
56    $(this).parent().siblings().removeClass('show');
57
58    if(window.matchMedia('(max-width: 991px)').matches) {
59      psNavbar.update();
60    }
61  })
62
63  // Closing dropdown menu of navbar menu
64  $(document).on('click touchstart', function(e){
65    e.stopPropagation();
66
67    // closing nav sub menu of header when clicking outside of it
68    if(window.matchMedia('(min-width: 992px)').matches) {
69      var navTarg = $(e.target).closest('.navbar-menu .nav-item').length;
70      if(!navTarg) {
71        $('.navbar-header .show').removeClass('show');
72      }
73    }
74  })
75
76  $('#mainMenuClose').on('click', function(e){
77    e.preventDefault();
78    $('body').removeClass('navbar-nav-show');
79  });
80
81  $('#sidebarMenuOpen').on('click', function(e){
82    e.preventDefault();
83    $('body').addClass('sidebar-show');
84  })
85
86  // Navbar Search
87  $('#navbarSearch').on('click', function(e){
88    e.preventDefault();
89    $('.navbar-search').addClass('visible');
90    $('.backdrop').addClass('show');
91  })
92
93  $('#navbarSearchClose').on('click', function(e){
94    e.preventDefault();
95    $('.navbar-search').removeClass('visible');
96    $('.backdrop').removeClass('show');
97  })
98
99
100
101  ////////// SIDEBAR //////////
102
103  // Initialize PerfectScrollbar for sidebar menu
104  if($('#sidebarMenu').length) {
105    const psSidebar = new PerfectScrollbar('#sidebarMenu', {
106      suppressScrollX: true
107    });
108
109
110    // Showing sub menu in sidebar
111    $('.sidebar-nav .with-sub').on('click', function(e){
112      e.preventDefault();
113      $(this).parent().toggleClass('show');
114
115      psSidebar.update();
116    })
117  }
118
119
120  $('#mainMenuOpen').on('click touchstart', function(e){
121    e.preventDefault();
122    $('body').addClass('navbar-nav-show');
123  })
124
125  $('#sidebarMenuClose').on('click', function(e){
126    e.preventDefault();
127    $('body').removeClass('sidebar-show');
128  })
129
130  // hide sidebar when clicking outside of it
131  $(document).on('click touchstart', function(e){
132    e.stopPropagation();
133
134    // closing of sidebar menu when clicking outside of it
135    if(!$(e.target).closest('.burger-menu').length) {
136      var sb = $(e.target).closest('.sidebar').length;
137      var nb = $(e.target).closest('.navbar-menu-wrapper').length;
138      if(!sb && !nb) {
139        if($('body').hasClass('navbar-nav-show')) {
140          $('body').removeClass('navbar-nav-show');
141        } else {
142          $('body').removeClass('sidebar-show');
143        }
144      }
145    }
146  });
147
148
149  $(document).on('click','.btn-open-ticket',function(e){
150            e.preventDefault(); 
151		  
152		  	 $("#modalTicket").modal('show');
153		 
154 	});
155
156	
157})

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.