PageSourceSearch

https://www.clubnet.mz/assets/js/script.js

js clubnet.mz collected 2026-10-08 11:30:44 UTC 4,964 bytes, 218 lines download raw bytes

1function getWidth(){
2    return ((window.innerWidth > 0) ? window.innerWidth : screen.width);
3}
4
5var SITE_LANG=$('body').data('lang');
6var SITE_URL=$('body').data('site-url');
7
8$(window).bind("load", function() {
9    hashOnloadScroll();
10
11});
12
13$(document).ready(function() {
14
15     SITE_LANG=$('body').data('lang');
16     SITE_URL=$('body').data('site-url');
17
18    setBodyPadding();
19    $(".se-pre-con").fadeOut("slow");
20
21    if(getWidth()<700){
22        // $("#advertise-sm .brand-heading").removeClass("wow");
23    }
24    checkScroll();
25
26});
27
28$('#inner-navegation-bar .nav-link').on('click', function(e) {
29
30    if($("#navegation-bar .navbar-collapse.collapse")[0]){
31        $("#navegation-bar .navbar-collapse.collapse").removeClass('show');
32    }
33
34});
35
36$('#inner-navegation-bar a[href*="#"]:not(a[href*="/#"])').on('click', function(e) {
37
38
39    e.preventDefault();
40
41    scrollToSycng($(this).attr('href'));
42    var dataX=$(this).attr('href');
43    if(history.pushState) {
44        history.pushState(null, null, dataX);
45    }
46
47    if($('#inner-navegation-bar .nav-item.active')[0]){
48        $('#inner-navegation-bar .nav-item.active').removeClass('active');
49    }
50    // $(this).parent().addClass('active');
51
52
53
54});
55
56function scrollToSycng(location) {
57
58
59    function tmpFunc() {
60        var decrease=70;
61        if(getWidth()<572 ){
62            var sbbox = document.getElementById("navegation-bar");
63            var sbheight = sbbox.offsetHeight;
64            decrease=sbheight-10;
65        }
66        $('html, body').animate(
67            {
68                scrollTop: $(location).offset().top-decrease,
69            },
70            900,
71            'linear'
72        );
73    }
74
75    $.when(tmpFunc()).done(function(  ) {
76
77        $("#navegation-bar").addClass("nav-pq");
78        $('#navegation-bar').addClass('top-nav-collapse');
79        // alert(33);
80    });
81
82
83}
84
85
86$(document).mouseup(function(e)
87{
88    if($("#inner-navegation-bar .navbar-collapse.collapse")[0]){
89
90        var container = $("#inner-navegation-bar");
91
92        // if the target of the click isn't the container nor a descendant of the container
93        if (!container.is(e.target) && container.has(e.target).length === 0)
94        {
95            $("#inner-navegation-bar .navbar-collapse.collapse").removeClass('show');
96        }
97
98    }
99
100});
101
102$('.lang-c a.disabled-w-link').on('click', function(e) {
103
104    e.preventDefault();
105
106});
107
108$(window).resize(function() {
109    setBodyPadding();
110});
111
112function setBodyPadding() {
113    if($("#navegation-bar")[0]){
114            // if(getWidth()<1100){
115
116            var sbbox = document.getElementById("navegation-bar");
117
118// width and height in pixels, including padding and border
119// Corresponds to jQuery outerWidth(), outerHeight()
120            var sbwidth = sbbox.offsetWidth;
121            var sbheight = sbbox.offsetHeight;
122
123// width and height in pixels, including padding, but without border
124// Corresponds to jQuery innerWidth(), innerHeight()
125            var sbwidth2 = sbbox.clientWidth;
126            var sbheight2 = sbbox.clientHeight;
127
128            $("body").css('padding-top',sbheight);
129
130
131            // } else{
132            //     $("#vbd-intro-slide").css('margin-top',0);
133            // }
134
135    }
136}
137
138$(document).on("click",".disabled-w-link", function (e) {
139    e.preventDefault();
140
141});
142
143
144$(document).on("click",".btn-sup", function (e) {
145    window.scrollTo(0, 0); 
146});
147
148       
149        
150$(document).on("click",".product-item-trigger", function (e) {
151    e.preventDefault();
152    var parEl=$(this).parents('.product-item');
153    var parElC= parEl.find('.product-item-trigger');
154    var parElP= parEl.find('.product-preview');
155    parElC.removeClass('active');
156    $(this).addClass('active');
157
158    if(parElP.hasClass('d-none')){
159        parElP.removeClass('d-none');
160    }
161
162
163    parEl.find('.product-desc').html( $(this).find('.product-desc-hold').html() );
164
165    parElP.find('img.product-preview-img').attr('src',$(this).find('img').attr('src'));
166
167    parEl.find('.product-title').text($(this).data('title'));
168
169    if($(this).data('catalog')!='' && $(this).data('catalog')!=' '){
170
171        if(parElP.find('a').hasClass('hidden')){
172            parElP.find('a').removeClass('hidden');
173        }
174        parElP.find('a').attr('href',$(this).data('catalog'));
175
176    } else {
177        parElP.find('a').addClass('hidden');
178    }
179
180
181});
182
183
184function hashOnloadScroll(){
185    var hash = window.location.hash.substr(1);
186// console.log(hash);
187    if( hash === 'services' ||   hash === 'footer'||  hash === 'about' ||  hash === 'oasis' ||  hash === 'products' ||  hash === 'about' ||  hash === 'coverage' ||  hash === 'my-clubnet' ||  hash === 'home' ){
188
189        scrollToSycng('#'+hash);
190    }
191}
192
193
194
195
196
197$(window).scroll(function() {
198    // checkNavegation();
199
200    // if($('.navegation-rev')[0]) {
201        checkScroll();
202    // }
203
204
205});
206
207
208function checkScroll(){
209
210
211    if ($(this).scrollTop() < 100){
212            $(".btn-sup").hide();
213        } else{
214            $(".btn-sup").show();
215        }
216
217
218}

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.