PageSourceSearch

https://www.pbs.gov.pk/wp-content/plugins/ova-framework/assets/js/script-elementor.js?ver=7.1.2

js pbs.gov.pk collected 2026-10-02 02:54:36 UTC 16,221 bytes, 550 lines download raw bytes

1(function($){
2	"use strict";
3	
4
5	$(window).on('elementor/frontend/init', function () {
6        
7		/* Menu Shrink */
8        elementorFrontend.hooks.addAction('frontend/element_ready/ova_menu.default', function(){
9
10			$( '.ova_menu_clasic .ova_openNav' ).on( 'click', function(){
11				$( this ).closest('.ova_wrap_nav').find( '.ova_nav' ).removeClass( 'hide' );
12				$( this ).closest('.ova_wrap_nav').find( '.ova_nav' ).addClass( 'show' );
13				$( '.ova_menu_clasic  .ova_closeCanvas' ).css( 'width', '100%' );
14
15				
16				$( 'body' ).css( 'background-color', 'rgba(0,0,0,0.4)' );
17				
18			});
19
20			$( '.ova_menu_clasic  .ova_closeNav' ).on( 'click', function(){
21				$( this ).closest('.ova_wrap_nav').find( '.ova_nav' ).removeClass( 'show' );
22				$( this ).closest('.ova_wrap_nav').find( '.ova_nav' ).addClass( 'hide' );
23				$( '.ova_closeCanvas' ).css( 'width', '0' );
24
25
26				
27				$( 'body' ).css( 'background-color', 'transparent' );
28				
29			});
30
31			// Display in mobile
32			$( '.ova_menu_clasic li.menu-item button.dropdown-toggle').off('click').on( 'click', function() {
33			    $(this).parent().find('.dropdown-menu').first().toggle('fast');
34			});
35
36        	if( $('.ovamenu_shrink').length > 0 && $( 'body' ).data('elementor-device-mode') == 'desktop' ){
37				
38				if( !$('.show_mask_header').hasClass( 'mask_header_shrink' ) ){
39					$( '<div class="show_mask_header mask_header_shrink" style="position: relative; height: 0;"></div>' ).insertAfter('.ovamenu_shrink');
40					
41
42				}
43
44				
45				var header = $('.ovamenu_shrink');
46				var header_shrink_height = header.height();
47				
48
49				$(window).scroll(function () {
50						
51						var scroll = $(this).scrollTop();
52
53						if (scroll >= header_shrink_height+150 ) {
54							header.addClass( 'active_fixed' );
55							$('.mask_header_shrink').css('height',header_shrink_height);
56				        } else {
57				            header.removeClass('active_fixed');
58				            $('.mask_header_shrink').css('height','0');
59				        }
60				});
61			}
62
63			if( $('.ovamenu_shrink_mobile').length > 0 && $( 'body' ).data('elementor-device-mode') != 'desktop' ){
64				
65				if( !$('.show_mask_header_mobile').hasClass( 'mask_header_shrink_mobile' ) ){
66					$( '<div class="show_mask_header_mobile mask_header_shrink_mobile" style="position: relative; height: 0;"></div>' ).insertAfter('.ovamenu_shrink_mobile');
67					
68				}
69				
70				var header = $('.ovamenu_shrink_mobile');
71				var header_shrink_height = header.height();
72				
73
74				$(window).scroll(function () {
75						
76						var scroll = $(this).scrollTop();
77
78						if (scroll >= header_shrink_height+150 ) {
79							header.addClass( 'active_fixed' );
80							$('.mask_header_shrink_mobile').css('height',header_shrink_height);
81				        } else {
82				            header.removeClass('active_fixed');
83				            $('.mask_header_shrink_mobile').css('height','0');
84				        }
85				});
86			}
87
88        });
89
90        /* End Shrink menu */
91
92        /* Search Popup */
93		elementorFrontend.hooks.addAction('frontend/element_ready/ova_search_popup.default', function(){
94			$( '.ova_wrap_search_popup i' ).on( 'click', function(){
95				$( this ).closest( '.ova_wrap_search_popup' ).addClass( 'show' );
96			});
97
98			$( '.btn_close' ).on( 'click', function(){
99				$( this ).closest( '.ova_wrap_search_popup' ).removeClass( 'show' );
100
101			});
102		});
103		/* end Search Popup */
104
105		/* Skill bar */
106		elementorFrontend.hooks.addAction('frontend/element_ready/ova_skill_bar.default', function(){
107			$('.skillbar').appear();
108			$(document.body).on( 'appear', '.skillbar', function(){
109				jQuery(this).find('.skillbar-bar').animate({
110					width:jQuery(this).attr('data-percent'),
111				},3000);
112
113				jQuery(this).find('.percent').animate({
114					left: jQuery(this).attr('data-percent') 
115				},{
116					duration: 3000,
117					step: function( now, fx ){
118						// console.log( 'now: ' + now );
119						var data = Math.round(now);
120						$(this).find('.relative span').html(data + '%');
121					}
122
123				});
124
125			});
126
127		});
128		/* end skill bar */
129
130
131		/* Form email */
132		elementorFrontend.hooks.addAction('frontend/element_ready/ova_form_mail.default', function(){
133			$('.ova-form-mail input[type="submit"]').on('click', function(e){
134				var that = $(this);
135				var flag = true;
136				$('.ova-form-mail .con .input .error').css({'display':'none'});
137				that.closest('.ova-form-mail').find('.field').each(function( index ){
138					if( $(this).hasClass('required') && $(this).val() == '' ){
139						flag = false;
140						$(this).parent('.input').children('.error').css({'display':'block'});
141					}
142				});
143
144				if( ! flag ){
145					e.preventDefault();
146					return false;
147				}
148				
149			})
150		});
151		/* end email */
152
153
154		/* testimonial */
155		elementorFrontend.hooks.addAction('frontend/element_ready/ova_testimonial.default', function(){
156			$(".slide-testimonials").each(function(){
157		        var owlsl = $(this) ;
158		        var owlsl_ops = owlsl.data('options') ? owlsl.data('options') : {};
159
160		        var responsive_value = {
161		            0:{
162		              items:1,
163		              nav:false
164		            },
165		            576:{
166		              items:1
167
168		            },
169		            992:{
170		              items:1
171		            },
172		            1170:{
173		              items:owlsl_ops.items
174		            }
175		        };
176		        
177		        owlsl.owlCarousel({
178		          autoWidth: owlsl_ops.autoWidth,
179		          margin: owlsl_ops.margin,
180		          items: owlsl_ops.items,
181		          loop: owlsl_ops.loop,
182		          autoplay: owlsl_ops.autoplay,
183		          autoplayTimeout: owlsl_ops.autoplayTimeout,
184		          center: owlsl_ops.center,
185		          nav: owlsl_ops.nav,
186		          dots: owlsl_ops.dots,
187		          thumbs: owlsl_ops.thumbs,
188		          autoplayHoverPause: owlsl_ops.autoplayHoverPause,
189		          slideBy: owlsl_ops.slideBy,
190		          smartSpeed: owlsl_ops.smartSpeed,
191		          navText:[
192		          '<i class="fa fa-angle-left" ></i>',
193		          '<i class="fa fa-angle-right" ></i>'
194		          ],
195		          responsive: responsive_value,
196		        });
197
198		      /* Fixed WCAG */
199		      owlsl.find(".owl-nav button.owl-prev").attr("title", "Previous");
200            owlsl.find(".owl-nav button.owl-next").attr("title", "Next");
201            owlsl.find(".owl-dots button").attr("title", "Dots");
202
203		      });
204		});
205		/* end testimonial */
206
207		/* ova_slide*/
208		elementorFrontend.hooks.addAction('frontend/element_ready/ova_slide.default', function(){
209			$(".slide").each(function(){
210		        var owlsl = $(this) ;
211		        var owlsl_ops = owlsl.data('options') ? owlsl.data('options') : {};
212
213		        var responsive_value = {
214		            0:{
215		              items:1,
216		              nav:false
217		            },
218		            576:{
219		              items:1
220
221		            },
222		            768:{
223		              items:2
224		            },
225		            1025:{
226		              items:owlsl_ops.items
227		            }
228		        };
229		        
230		        owlsl.owlCarousel({
231		          autoWidth: owlsl_ops.autoWidth,
232		          margin: owlsl_ops.margin,
233		          items: owlsl_ops.items,
234		          loop: owlsl_ops.loop,
235		          autoplay: owlsl_ops.autoplay,
236		          autoplayTimeout: owlsl_ops.autoplayTimeout,
237		          center: owlsl_ops.center,
238		          nav: owlsl_ops.nav,
239		          dots: owlsl_ops.dots,
240		          thumbs: owlsl_ops.thumbs,
241		          autoplayHoverPause: owlsl_ops.autoplayHoverPause,
242		          slideBy: owlsl_ops.slideBy,
243		          smartSpeed: owlsl_ops.smartSpeed,
244		          navText:[
245		          '<i class="fa fa-angle-left" ></i>',
246		          '<i class="fa fa-angle-right" ></i>'
247		          ],
248		          responsive: responsive_value,
249		        });
250
251		      });
252		});
253		/* end ova_slide */
254
255
256		/* ova_blog_slide */
257		elementorFrontend.hooks.addAction('frontend/element_ready/ova_blog_slide.default', function(){
258			$(".blog-slide").each(function(){
259		        var owlsl = $(this) ;
260		        var owlsl_ops = owlsl.data('options') ? owlsl.data('options') : {};
261		        var responsive_value = {
262		            0:{
263		              items:1,
264		              nav:false,
265		              autoplayHoverPause:false
266		            },
267		            576:{
268		              items:1,
269		              autoplayHoverPause:false
270
271
272		            },
273		            992:{
274		              items:2,
275		              nav:false
276		            },
277		            1170:{
278		              items:owlsl_ops.items
279		            }
280		        };
281		        
282		        owlsl.owlCarousel({
283		          autoWidth: owlsl_ops.autoWidth,
284		          margin: owlsl_ops.margin,
285		          items: owlsl_ops.items,
286		          loop: owlsl_ops.loop,
287		          autoplay: owlsl_ops.autoplay,
288		          autoplayTimeout: owlsl_ops.autoplayTimeout,
289		          center: owlsl_ops.center,
290		          nav: owlsl_ops.nav,
291		          dots: owlsl_ops.dots,
292		          thumbs: owlsl_ops.thumbs,
293		          autoplayHoverPause: owlsl_ops.autoplayHoverPause,
294		          slideBy: owlsl_ops.slideBy,
295		          smartSpeed: owlsl_ops.smartSpeed,
296		          navText:[
297		          '<i class="arrow_carrot-left" ></i>',
298		          '<i class="arrow_carrot-right" ></i>'
299		          ],
300		          responsive: responsive_value,
301		        });
302		        
303		        /* Fixed WCAG */
304		        owlsl.find(".owl-nav button.owl-prev").attr("title", "Previous");
305		        owlsl.find(".owl-nav button.owl-next").attr("title", "Next");
306		        owlsl.find(".owl-dots button").attr("title", "Dots");
307
308		      });
309		});
310		/* end ova_blog_slide */
311		
312
313		/* contact */
314		elementorFrontend.hooks.addAction('frontend/element_ready/ova_contact_slide.default', function(){
315			$(".slide-contact").each(function(){
316		        var owlsl = $(this) ;
317		        var owlsl_ops = owlsl.data('options') ? owlsl.data('options') : {};
318
319		        var responsive_value = {
320		            0:{
321		              items:1,
322		              nav:false
323		            },
324		            576:{
325		              items:1
326
327		            },
328		            992:{
329		              items:2
330		            },
331		            1170:{
332		              items:owlsl_ops.items
333		            }
334		        };
335		        
336		        owlsl.owlCarousel({
337		          autoWidth: owlsl_ops.autoWidth,
338		          margin: owlsl_ops.margin,
339		          items: owlsl_ops.items,
340		          loop: owlsl_ops.loop,
341		          autoplay: owlsl_ops.autoplay,
342		          autoplayTimeout: owlsl_ops.autoplayTimeout,
343		          center: owlsl_ops.center,
344		          nav: true,
345		          dots: owlsl_ops.dots,
346		          thumbs: owlsl_ops.thumbs,
347		          autoplayHoverPause: owlsl_ops.autoplayHoverPause,
348		          slideBy: owlsl_ops.slideBy,
349		          smartSpeed: owlsl_ops.smartSpeed,
350		          navText:[
351		          '<i class="arrow_carrot-left" ></i>',
352		          '<i class="arrow_carrot-right" ></i>'
353		          ],
354		          responsive: responsive_value,
355		        });
356
357		        /* Fixed WCAG */
358		        owlsl.find(".owl-nav button.owl-prev").attr("title", "Previous");
359		        owlsl.find(".owl-nav button.owl-next").attr("title", "Next");
360		        owlsl.find(".owl-dots button").attr("title", "Dots");
361
362		      });
363		});
364		/* end contact */
365
366		/* Time Coundown */
367		elementorFrontend.hooks.addAction('frontend/element_ready/ova_time_countdown.default', function(){
368			
369			var date = $('.due_date').data('day').split(' ');
370			var day = date[0].split('-');
371			var time = date[1].split(':');
372			var date_countdown = new Date( day[0], day[1]-1, day[2], time[0], time[1] );
373			$('.due_date').countdown({until: date_countdown, format: 'DHMS'});
374			
375		});
376      // end time countdown 
377      
378
379      /* ova_history */
380		elementorFrontend.hooks.addAction('frontend/element_ready/ova_history.default', function(){
381			
382
383			$(window).scroll(function() {
384				var wS = $(this).scrollTop();
385	      		$('.ova-history .wp-item').each(function(){
386	      			var hT = $(this).offset().top;
387				    var hH = $(this).outerHeight();
388				    var wH = $(window).height();
389				    
390				   if (wS + 250 > (hT+hH-wH)){
391				      $(this).addClass('active');
392				   }
393		  		})
394			});
395			
396		
397      			// end ova_history
398   
399   		});
400   		/* ova_title_slide */
401		elementorFrontend.hooks.addAction('frontend/element_ready/ova_title.default', function(){
402			$(".title-slide").each(function(){
403		        var owlsl = $(this) ;
404		        var owlsl_ops = owlsl.data('options') ? owlsl.data('options') : {};
405
406		        var responsive_value = {
407		            0:{
408		              items:1,
409		              nav:true
410		            },
411		            576:{
412		              items:1,
413		              nav:true
414
415		            },
416		            992:{
417		              items:1,
418		              nav:true
419		            },
420		            1170:{
421		              items:owlsl_ops.items
422		            }
423		        };
424		        
425		        owlsl.owlCarousel({
426		          autoWidth: owlsl_ops.autoWidth,
427		          margin: owlsl_ops.margin,
428		          items: owlsl_ops.items,
429		          loop: owlsl_ops.loop,
430		          autoplay: owlsl_ops.autoplay,
431		          autoplayTimeout: owlsl_ops.autoplayTimeout,
432		          center: owlsl_ops.center,
433		          nav: owlsl_ops.nav,
434		          dots: owlsl_ops.dots,
435		          thumbs: owlsl_ops.thumbs,
436		          autoplayHoverPause: owlsl_ops.autoplayHoverPause,
437		          slideBy: owlsl_ops.slideBy,
438		          smartSpeed: owlsl_ops.smartSpeed,
439		          navText:[
440		          '<i class="arrow_carrot-left" ></i>',
441		          '<i class="arrow_carrot-right" ></i>'
442		          ],
443		          responsive: responsive_value,
444		        });
445
446		        /* Fixed WCAG */
447		        owlsl.find(".owl-nav button.owl-prev").attr("title", "Previous");
448		        owlsl.find(".owl-nav button.owl-next").attr("title", "Next");
449
450		      });
451		});
452		/* end ova_title_slide */
453
454
455   		  /* ova_tabs */
456		elementorFrontend.hooks.addAction('frontend/element_ready/ova_tabs.default', function(){
457
458          function activeTab(obj)
459                {
460                    // Xóa class active tất cả các tab
461                    $('.tab-wrapper ul li').removeClass('active');
462
463                    // Thêm class active vòa tab đang click
464                    $(obj).addClass('active');
465
466                    // Lấy href của tab để show content tương ứng
467                    var id = $(obj).find('a').attr('href');
468
469                    // Ẩn hết nội dung các tab đang hiển thị
470                    $('.tab-item').hide();
471
472                    // Hiển thị nội dung của tab hiện tại
473                    $(id) .show();
474                }
475
476                // Sự kiện click đổi tab
477                $('.tab li').click(function(){
478                    activeTab(this);
479                    return false;
480                });
481
482                // Active tab đầu tiên khi trang web được chạy
483                activeTab($('.tab li:first-child'));
484			
485		
486      		
487   		});
488   		// end ova_tabs
489
490   				  /* ova_give */
491		elementorFrontend.hooks.addAction('frontend/element_ready/ova_give_donations.default', function(){
492
493           if( $(".archive_give_donation .media .video").length > 0 ){
494         $(".archive_give_donation .media .video").fancybox({
495            iframe : {
496               css : {
497                  maxWidth : '80%',
498               }
499            }
500         });
501      }
502			
503		
504      		
505   		});
506   		// end ova_give
507
508
509
510
511   		/* ova_iso */
512		elementorFrontend.hooks.addAction('frontend/element_ready/ova_iso.default', function(){
513
514			var $grid = $('.ova_isotope').isotope({
515				itemSelector: '.grid-item',
516				percentPosition: true,
517				masonry: {
518				// use element for option
519				columnWidth: '.grid-sizer'
520				}
521			});
522
523			$(window).resize(function(){
524				$grid.isotope('layout');
525			});
526
527			$( document ).ready(function() {
528			   $grid.isotope('layout');
529			});
530      		
531   	});
532   		// end ova_iso
533
534   		/* ova_page_menu */
535		elementorFrontend.hooks.addAction('frontend/element_ready/ova_menu_page.default', function(){
536
537			$('.ova_menu_page.type3').each(function(){
538				var toggle = $(this).find('.dropdown-toggle');
539				toggle.off('click').on('click', function(){
540					$(this).parent().find('.dropdown-menu').first().toggle('fast');
541				});
542			});
543      		
544   		});
545   		// end ova_page_menu
546   
547   
548});
549
550})(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.