PageSourceSearch

https://cdn.teknofest.org/static/dronza/js/custom.js

js teknofest.org collected 2026-10-09 16:47:19 UTC 21,775 bytes, 814 lines download raw bytes

1/* =====================================
2All JavaScript fuctions Start
3======================================*/
4(function ($) {
5	
6    'use strict';
7/*--------------------------------------------------------------------------------------------
8	document.ready ALL FUNCTION START
9---------------------------------------------------------------------------------------------*/	
10
11
12// > Video responsive function by = custom.js ========================= //	
13	function video_responsive(){	
14		jQuery('iframe[src*="youtube.com"]').wrap('<div class="embed-responsive embed-responsive-16by9"></div>');
15		jQuery('iframe[src*="vimeo.com"]').wrap('<div class="embed-responsive embed-responsive-16by9"></div>');	
16	}  
17
18// > magnificPopup function	by = magnific-popup.js =========================== //
19	function magnific_popup(){
20        jQuery('.mfp-gallery').magnificPopup({
21          delegate: '.mfp-link',
22          type: 'image',
23          tLoading: 'Loading image #%curr%...',
24          mainClass: 'mfp-img-mobile',
25          gallery: {
26            enabled: true,
27            navigateByImgClick: true,
28            preload: [0,1] // Will preload 0 - before current, and 1 after the current image
29          },
30          image: {
31            tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
32          }
33       });
34	}
35
36// > magnificPopup for video function	by = magnific-popup.js ===================== //	
37	function magnific_video(){	
38		jQuery('.mfp-video').magnificPopup({
39			type: 'iframe',
40		});
41	}
42
43// Vertically center Bootstrap modal popup function by = custom.js ==============//
44	function popup_vertical_center(){	
45		jQuery(function() {
46			function reposition() {
47				var modal = jQuery(this),
48				dialog = modal.find('.modal-dialog');
49				modal.css('display', 'block');
50				
51				// Dividing by two centers the modal exactly, but dividing by three 
52				// or four works better for larger screens.
53				dialog.css("margin-top", Math.max(0, (jQuery(window).height() - dialog.height()) / 2));
54			}
55			// Reposition when a modal is shown
56			jQuery('.modal').on('show.bs.modal', reposition);
57			// Reposition when the window is resized
58			jQuery(window).on('resize', function() {
59				jQuery('.modal:visible').each(reposition);
60			});
61		});
62	}
63
64// > Main menu sticky on top  when scroll down function by = custom.js ========== //		
65	function sticky_header(){
66		if(jQuery('.sticky-header').length){
67			var sticky = new Waypoint.Sticky({
68			  element: jQuery('.sticky-header')
69			});
70		}
71	}
72	
73
74	// > Sidebar sticky  when scroll down function by = custom.js ========== //		
75	function sticky_sidebar(){		
76		$('.rightSidebar')
77			.theiaStickySidebar({
78				additionalMarginTop: 100
79			});		
80	}	
81	
82	// > Price range slide function by = jquery.ui.js ========== //			
83  $(function() {
84    $( "#slider-range" ).slider({
85      range: true,
86      min: 0,
87      max: 500,
88      values: [ 100, 300 ],
89      slide: function( event, ui ) {
90        $( "#amount" ).html( "$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ] );
91		$( "#amount1" ).val(ui.values[ 0 ]);
92		$( "#amount2" ).val(ui.values[ 1 ]);
93      }
94    });
95    $( "#amount" ).html( "$" + $( "#slider-range" ).slider( "values", 0 ) +
96    " - $" + $( "#slider-range" ).slider( "values", 1 ) );
97
98	$( "#amount1" ).val($( "#slider-range" ).slider( "values", 0 ));
99	$( "#amount2" ).val($( "#slider-range" ).slider( "values", 1 ));
100	
101  });	
102
103
104// > page scroll top on button click function by = custom.js ===================== //	
105	function scroll_top(){
106		jQuery("button.scroltop").on('click', function() {
107			jQuery("html, body").animate({
108				scrollTop: 0
109			}, 1000);
110			return false;
111		});
112
113		jQuery(window).on("scroll", function() {
114			var scroll = jQuery(window).scrollTop();
115			if (scroll > 900) {
116				jQuery("button.scroltop").fadeIn(1000);
117			} else {
118				jQuery("button.scroltop").fadeOut(1000);
119			}
120		});
121	}
122	
123// > input type file function by = custom.js ========================== //	 	 
124	function input_type_file_form(){
125		jQuery(document).on('change', '.btn-file :file', function() {
126			var input = jQuery(this),
127				numFiles = input.get(0).files ? input.get(0).files.length : 1,
128				label = input.val().replace(/\\/g, '/').replace(/.*\//, '');
129			input.trigger('fileselect', [numFiles, label]);
130		});
131
132		jQuery('.btn-file :file').on('fileselect', function(event, numFiles, label) {
133			var input = jQuery(this).parents('.input-group').find(':text'),
134				log = numFiles > 10 ? numFiles + ' files selected' : label;
135			if (input.length) {
136				input.val(log);
137			} else {
138				if (log) alert(log);
139			}
140		});	
141	}
142
143// > input Placeholder in IE9 function by = custom.js ======================== //	
144	function placeholderSupport(){
145	/* input placeholder for ie9 & ie8 & ie7 */
146		jQuery.support.placeholder = ('placeholder' in document.createElement('input'));
147		/* input placeholder for ie9 & ie8 & ie7 end*/
148		/*fix for IE7 and IE8  */
149		if (!jQuery.support.placeholder) {
150			jQuery("[placeholder]").on('focus', function () {
151				if (jQuery(this).val() === jQuery(this).attr("placeholder")) jQuery(this).val("");
152			}).blur(function () {
153				if (jQuery(this).val() === "") jQuery(this).val(jQuery(this).attr("placeholder"));
154			}).blur();
155
156			jQuery("[placeholder]").parents("form").on('submit', function () {
157				jQuery(this).find('[placeholder]').each(function() {
158					if (jQuery(this).val() === jQuery(this).attr("placeholder")) {
159						 jQuery(this).val("");
160					}
161				});
162			});
163		}
164		/*fix for IE7 and IE8 end */
165	}	
166
167
168// > footer fixed on bottom function by = custom.js ======================== //	
169	function footer_fixed() {
170	  jQuery('.site-footer').css('display', 'block');
171	  jQuery('.site-footer').css('height', 'auto');
172	  var footerHeight = jQuery('.site-footer').outerHeight();
173	  jQuery('.footer-fixed > .page-wraper').css('padding-bottom', footerHeight);
174	  jQuery('.site-footer').css('height', footerHeight);
175	}
176	
177	
178// > accordion active calss function by = custom.js ========================= //	
179	function accordion_active() {
180		$('.acod-head a').on('click', function() {
181			$('.acod-head').removeClass('acc-actives');
182			$(this).parents('.acod-head').addClass('acc-actives');
183			$('.acod-title').removeClass('acc-actives'); //just to make a visual sense
184			$(this).parent().addClass('acc-actives'); //just to make a visual sense
185			($(this).parents('.acod-head').attr('class'));
186		 });
187	}	
188
189// > Nav submenu show hide on mobile by = custom.js
190	 function mobile_nav(){
191		jQuery(".sub-menu").parent('li').addClass('has-child');
192		jQuery(".mega-menu").parent('li').addClass('has-child');
193		jQuery("<div class='fa fa-angle-right submenu-toogle'></div>").insertAfter(".has-child > a");
194		jQuery('.has-child a+.submenu-toogle').on('click',function(ev) {
195			jQuery(this).next(jQuery('.sub-menu')).slideToggle('fast', function(){
196				jQuery(this).parent().toggleClass('nav-active');
197			});
198			ev.stopPropagation();
199		});
200	 }
201	 
202	// Mobile side drawer function by = custom.js
203	function mobile_side_drawer(){
204		jQuery('#mobile-side-drawer').on('click', function () { 
205			jQuery('.mobile-sider-drawer-menu').toggleClass('active');
206		});
207	}	
208	
209//  > Top Search bar Show Hide function by = custom.js =================== //	
210
211	function site_search(){
212		
213	  jQuery(".header-search-icon").on('click', function(){
214		jQuery("#search-toggle-block").slideToggle("slow");
215		jQuery('.header-search-icon').toggleClass('close');
216	  });
217	  
218	}	
219	
220// Home product showcase function by = owl.carousel.js ========================== //
221	function product_show_slider(){
222	jQuery('.product-show-slider').owlCarousel({
223		loop:true,
224		autoplay:true,
225		nav:true,
226		dots: false,
227		center:true,	
228		margin:10,
229		navText: ['<i class="fa fa-long-arrow-left"></i>', '<i class="fa fa-long-arrow-right"></i>'],
230		responsive:{
231			0:{
232				items:1,
233			},
234			640:{
235				items:1,
236			},			
237			768:{
238				items:2,
239     		},				
240			991:{
241				items:2,
242			},
243			1366:{
244				items:2,
245			},			
246			1400:{
247				items:3
248			}		
249		}
250	});
251	}
252	
253	
254// Home product showcase function by = owl.carousel.js ========================== //
255	function product_show_slider2(){
256	jQuery('.product-show-slider2').owlCarousel({
257		loop:true,
258		autoplay:false,
259		nav:false,
260		dots: true,
261		center:true,	
262		margin:10,
263		navText: ['<i class="fa fa-long-arrow-left"></i>', '<i class="fa fa-long-arrow-right"></i>'],
264		responsive:{
265			0:{
266				items:1,
267			},
268			640:{
269				items:1,
270			},			
271			767:{
272				items:2,
273     		},				
274			991:{
275				items:2,
276			},
277			1366:{
278				items:2,
279			},			
280			1400:{
281				items:2
282			}		
283		}
284	});
285	}	
286// Home page video gallery 1 function by = owl.carousel.js ========================== //
287	function video_gallery_one(){
288	jQuery('.video-gallery-one').owlCarousel({
289		loop:true,
290		autoplay:false,
291		nav:false,
292		dots: true,	
293		margin:0,
294		navText: ['<i class="fa fa-long-arrow-left"></i>', '<i class="fa fa-long-arrow-right"></i>'],
295		responsive:{
296			0:{
297				items:1,
298			},
299			640:{
300				items:1,
301			},			
302			767:{
303				items:2,
304     		},				
305			991:{
306				items:3,
307			},
308			1366:{
309				items:5,
310			},			
311			1400:{
312				items:5
313			}		
314		}
315	});
316	}	
317
318	
319// featured products Slider function by = owl.carousel.js ========================== //
320	function featured_products(){
321	jQuery('.featured-products').owlCarousel({
322		loop:true,
323		autoplay:true,
324		nav:true,
325		dots: false,	
326		margin:30,
327		navText: ['<i class="fa fa-chevron-left"></i>', '<i class="fa fa-chevron-right"></i>'],
328		responsive:{
329			0:{
330				items:1,
331			},
332			640:{
333				items:2,
334			},			
335			767:{
336				items:2,
337     		},				
338			991:{
339				items:3,
340			},
341			1024:{
342				items:3,
343			}	
344		}
345	});
346	}
347
348// Gallery Large Slider function by = slick.js ========================== //
349	function gallery_large(){
350	 jQuery('.slider-for').slick({
351	  slidesToShow: 1,
352	  slidesToScroll: 1,
353	  arrows: true,
354	  fade: true,
355	  asNavFor: '.slider-nav'
356	});
357	jQuery('.slider-nav').slick({
358	  slidesToShow: 3,
359	  slidesToScroll: 1,
360	  asNavFor: '.slider-for',
361	  dots: false,
362	  arrows: true,
363	  centerMode: false,
364	  focusOnSelect: true
365	});
366	}
367	
368	
369// Service Detail  Slider function by = slick.js ========================== //
370	function service_detail_slider(){
371	 jQuery('.service-detail-for').slick({
372	  slidesToShow: 1,
373	  slidesToScroll: 1,
374	  arrows: false,
375	  fade: true,
376	  asNavFor: '.service-detail-nav'
377	});
378	jQuery('.service-detail-nav').slick({
379	  slidesToShow: 3,
380	  slidesToScroll: 1,
381	  asNavFor: '.service-detail-for',
382	  dots: false,
383	  arrows: false,
384	  centerMode: false,
385	  focusOnSelect: true
386	});
387	}	
388	
389// > TouchSpin box function by  = jquery.bootstrap-touchspin.js =============== // 
390
391	function input_number_vertical_form() {	
392		jQuery("input[name='demo_vertical2']").TouchSpin({
393		  verticalbuttons: true,
394		  verticalupclass: 'fa fa-plus',
395		  verticaldownclass: 'fa fa-minus'
396		});	
397	}
398	
399// Home page Testimonial Slider function by = owl.carousel.js ========================== //
400	function testimonial_1_content(){
401	jQuery('.testimonial-1-content').owlCarousel({
402		loop:true,
403		autoplay:false,
404		nav:true,
405		dots: true,	
406		margin:30,
407		navText: ['<i class="flaticon-arrows"></i>', '<i class="flaticon-point-to"></i>'],
408		responsive:{
409			0:{
410				items:1,
411			},
412			1400:{
413				items:1
414			}		
415		}
416	});
417	}
418	
419// Home page Testimonial Slider function by = owl.carousel.js ========================== //
420	function testimonial_2_content(){
421	jQuery('.testimonial-2-content').owlCarousel({
422		loop:true,
423		autoplay:false,
424		nav:true,
425		dots: true,	
426		margin:30,
427		navText: ['<i class="flaticon-arrows"></i>', '<i class="flaticon-point-to"></i>'],
428		responsive:{
429		
430			0:{
431				items:1,
432			},
433			1400:{
434				items:1
435			}					
436		}
437	});
438	}	
439	
440// Gallery slider function by = owl.carousel.js ========================== //
441	function gallery_slider(){
442	jQuery('.gallery-slider').owlCarousel({
443		loop:true,
444		autoplay:false,
445		nav:true,
446		dots: false,	
447		margin:30,
448		navText: ['<i class="fa fa-chevron-left"></i>', '<i class="fa fa-chevron-right"></i>'],
449		responsive:{
450			0:{
451				items:1,
452			},
453			640:{
454				items:2,
455			},			
456			767:{
457				items:2,
458     		},				
459			991:{
460				items:3,
461			},
462			1024:{
463				items:3,
464			},	
465			
466			1200:{
467				items:4,
468			},					
469			1366:{
470				items:4,
471			},			
472			1400:{
473				items:5
474			}		
475		}
476	});
477	}	
478	
479	
480// Gallery slider function by = owl.carousel.js ========================== //
481	function gallery_slider2(){
482	jQuery('.gallery-slider2').owlCarousel({
483		loop:true,
484		autoplay:true,
485		nav:false,
486		dots: true,	
487		margin:30,
488		navText: ['<i class="fa fa-chevron-left"></i>', '<i class="fa fa-chevron-right"></i>'],
489		responsive:{
490			0:{
491				items:1,
492			},
493			640:{
494				items:2,
495			},			
496			767:{
497				items:2,
498     		},				
499			991:{
500				items:3,
501			},
502			1024:{
503				items:3,
504			}
505		}
506	});
507	}	
508	
509	
510// Project slider function by = owl.carousel.js ========================== //
511	function project_detail_slider(){
512	jQuery('.project-detail-slider').owlCarousel({
513		loop:true,
514		autoplay:false,
515		nav:true,
516		dots: false,	
517		margin:30,
518		navText: ['<i class="fa fa-chevron-left"></i>', '<i class="fa fa-chevron-right"></i>'],
519		responsive:{
520			0:{
521				items:1,
522			},
523			480:{
524				items:2,
525			},			
526			767:{
527				items:3,
528			},
529			1000:{
530				items:3
531			}
532		}
533	});
534	}		
535	
536
537
538//  home_client_carouse function by = owl.carousel.js ========================== //
539	function home_client_carousel_2(){
540	jQuery('.home-client-carousel-2').owlCarousel({
541		loop:true,
542		nav:false,
543		dots: false,				
544		margin:10,
545		autoplay:true,
546		navText: ['<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>'],
547		responsive:{
548			0:{
549				items:2,
550			},
551			480:{
552				items:3,
553			},			
554			767:{
555				items:4,
556			},
557			1000:{
558				items:6
559			}
560		}
561	});
562	}
563
564	function home_client_carousel_2(){
565	jQuery('.home-client-carousel-3').owlCarousel({
566		loop:true,
567		nav:false,
568		dots: false,
569		margin:10,
570		autoplay:true,
571		navText: ['<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>'],
572		responsive:{
573			0:{
574				items:1,
575			},
576
577			991:{
578				items:2,
579			},
580			1024:{
581				items:2,
582			}
583		}
584	});
585	}
586	
587	//  Counter Section function by = counterup.min.js
588	function counter_section(){
589		jQuery('.counter').counterUp({
590			delay: 10,
591			time: 3000
592		});	
593	}	
594
595		
596	jQuery('.nav-tabs a').on('click', function(e) {
597		e.preventDefault();
598		jQuery(this).tab('show');
599	});
600	
601	jQuery('.wt-accordion a').on('click', function() {
602		e.preventDefault();
603		jQuery(this).tab('show');
604	});	
605	
606// >Backgroung image scroling right function by = jquery.bgscroll.js		
607	function bg_image_moving(){
608		jQuery( function() {			  
609		jQuery('.bg-image-moving').bgscroll({scrollSpeed:20 , direction:'h' });
610		});
611	}
612
613/*--------------------------------------------------------------------------------------------
614	Window on load ALL FUNCTION START
615---------------------------------------------------------------------------------------------*/
616
617
618	// > masonry function function by = isotope.pkgd.min.js ========================= //	
619	function masonryBox() {
620        if ( jQuery().isotope ) {      
621            var $container = jQuery('.masonry-wrap');
622                $container.isotope({
623                    itemSelector: '.masonry-item',
624                    transitionDuration: '1s',
625					originLeft: true,
626					stamp: '.stamp'
627                });
628
629            jQuery('.masonry-filter li').on('click',function() {                           
630                var selector = jQuery(this).find("a").attr('data-filter');
631                jQuery('.masonry-filter li').removeClass('active');
632                jQuery(this).addClass('active');
633                $container.isotope({ filter: selector });
634                return false;
635            });
636    	}
637	}		
638	
639
640// > background image parallax function by = stellar.js ==================== //	
641	function bg_image_stellar(){
642		jQuery(function(){
643				jQuery.stellar({
644					horizontalScrolling: false,
645					verticalOffset:100
646				});
647			});			
648	}	
649
650// > page loader function by = custom.js ========================= //		
651	function page_loader() {
652		$('.loading-area').fadeOut(1000);
653	}
654
655/*--------------------------------------------------------------------------------------------
656    Window on scroll ALL FUNCTION START
657---------------------------------------------------------------------------------------------*/
658
659    function color_fill_header() {
660        var scroll = $(window).scrollTop();
661        if(scroll >= 100) {
662            $(".is-fixed").addClass("color-fill");
663        } else {
664            $(".is-fixed").removeClass("color-fill");
665        }
666    }
667	
668	// Bootstrap Select box function by  = bootstrap-select.min.js
669	function Bootstrap_Select(){	
670			jQuery('.selectpicker').selectpicker();
671		}	
672
673/*--------------------------------------------------------------------------------------------
674	document.ready ALL FUNCTION START
675---------------------------------------------------------------------------------------------*/
676	jQuery(document).ready(function() {
677		// > Top Search bar Show Hide function by = custom.js  		
678		site_search(),	
679		// > Video responsive function by = custom.js 
680		video_responsive(),
681		// > magnificPopup function	by = magnific-popup.js
682		magnific_popup(),
683		// > magnificPopup for video function	by = magnific-popup.js
684		magnific_video(),
685		// > Vertically center Bootstrap modal popup function by = custom.js
686		popup_vertical_center();
687		// > Main menu sticky on top  when scroll down function by = custom.js		
688		sticky_header(),
689	    // > Sidebar sticky  when scroll down function by = custom.js ========== //		
690	    sticky_sidebar(),		
691		// > page scroll top on button click function by = custom.js	
692		scroll_top(),
693		// > input type file function by = custom.js	 	
694		input_type_file_form(),
695		// > input Placeholder in IE9 function by = custom.js		
696		placeholderSupport(),
697		// > footer fixed on bottom function by = custom.js	
698		footer_fixed(),
699		// > accordion active calss function by = custom.js ========================= //			
700		accordion_active(),
701		// > Nav submenu on off function by = custome.js ===================//
702		mobile_nav(),
703		// Mobile side drawer function by = custom.js
704		mobile_side_drawer(),
705		// Gallery slider function by = owl.carousel.js ========================== //
706	    gallery_slider2(),
707		// Project slider function by = owl.carousel.js ========================== //
708		project_detail_slider(),		
709		// Home product showcase function by = owl.carousel.js ========================== //
710		product_show_slider(),
711		// Home product showcase function by = owl.carousel.js ========================== //
712	    product_show_slider2(),	
713		// Home page video gallery 1 function by = owl.carousel.js ========================== //
714		video_gallery_one(),
715        // featured products Slider function by = owl.carousel.js ========================== //
716	    featured_products(),
717		// Gallery Large Slider function by = slick.js ========================== //
718	    gallery_large(),
719		// Service Detail  Slider function by = slick.js ========================== //
720		service_detail_slider(),			
721		// > TouchSpin box function by  = jquery.bootstrap-touchspin.js =============== // 
722		input_number_vertical_form(),		
723		// Home page Testimonial Slider function by = owl.carousel.js ========================== //
724	    testimonial_1_content(),
725		// Home page Testimonial Slider function by = owl.carousel.js ========================== //
726		testimonial_2_content(),
727		// Gallery slider function by = owl.carousel.js ========================== //
728		gallery_slider(),		
729		//  Client logo Carousel function by = owl.carousel.js ========================== //
730		home_client_carousel_2(),
731		//  Counter Section function by = counterup.min.js ========================== //
732		counter_section(),
733		// >Backgroung image scroling right function by = jquery.bgscroll.js	
734	    bg_image_moving();		
735				
736	}); 	
737
738/*--------------------------------------------------------------------------------------------
739	Window Load START
740---------------------------------------------------------------------------------------------*/
741	jQuery(window).on('load', function () {
742		// Bootstrap Select box function by  = bootstrap-select.min.js
743		 Bootstrap_Select(),		
744		// > masonry function function by = isotope.pkgd.min.js		
745		masonryBox(),
746		// > background image parallax function by = stellar.js	
747		bg_image_stellar(),
748		// > page loader function by = custom.js		
749		page_loader();
750});
751
752 /*===========================
753	Window Scroll ALL FUNCTION START
754===========================*/
755
756	jQuery(window).on('scroll', function () {
757	// > Window on scroll header color fill 
758		color_fill_header();
759	});
760	
761/*===========================
762	Window Resize ALL FUNCTION START
763===========================*/
764
765	jQuery(window).on('resize', function () {
766	// > footer fixed on bottom function by = custom.js		 
767	 	footer_fixed();
768	});
769
770/*===========================
771	Document on  Submit FUNCTION START
772===========================*/
773
774	// > Contact form function by = custom.js	
775	jQuery(document).on('submit', 'form.cons-contact-form', function(e){
776		e.preventDefault();
777		var form = jQuery(this);
778		/* sending message */
779		jQuery.ajax({
780			url: 'http://thewebmax.com/dronza/form-handler2.php',
781			data: form.serialize() + "&action=contactform",
782			type: 'POST',
783			dataType: 'JSON',
784			beforeSend: function() {
785				jQuery('.loading-area').show();
786			},
787
788			success:function(data){
789				jQuery('.loading-area').hide();
790				if(data['success']){
791				jQuery("<div class='alert alert-success'>"+data['message']+"</div>").insertBefore('form.cons-contact-form');
792				}else{
793				jQuery("<div class='alert alert-danger'>"+data['message']+"</div>").insertBefore('form.cons-contact-form');	
794				}
795			}
796		});
797		jQuery('.cons-contact-form').trigger("reset");
798		return false;
799	});
800	
801
802
803
804		
805
806/*===========================
807	Document on  Submit FUNCTION END
808===========================*/	
809
810
811	
812	
813	
814})(window.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.