PageSourceSearch

https://jssuni.edu.in/jssaher/usic/js/function.js

js jssuni.edu.in collected 2026-10-02 17:44:41 UTC 5,950 bytes, 267 lines download raw bytes

1(function ($) {
2    "use strict";
3	
4	var $window = $(window); 
5	var $body = $('body'); 
6
7	/* Preloader Effect */
8	$window.on('load', function(){
9		$(".preloader").fadeOut(600);
10	});
11
12	/* Sticky Header */	
13	if($('.active-sticky-header').length){
14		$window.on('resize', function(){
15			setHeaderHeight();
16		});
17
18		function setHeaderHeight(){
19	 		$("header.main-header").css("height", $('header .header-sticky').outerHeight());
20		}	
21	
22		$(window).on("scroll", function() {
23			var fromTop = $(window).scrollTop();
24			setHeaderHeight();
25			var headerHeight = $('header .header-sticky').outerHeight()
26			$("header .header-sticky").toggleClass("hide", (fromTop > headerHeight + 100));
27			$("header .header-sticky").toggleClass("active", (fromTop > 600));
28		});
29	}	
30	
31	/* Slick Menu JS */
32	$('#menu').slicknav({
33		label : '',
34		prependTo : '.responsive-menu'
35	});
36
37	if($("a[href='#top']").length){
38		$("a[href='#top']").click(function() {
39			$("html, body").animate({ scrollTop: 0 }, "slow");
40			return false;
41		});
42	}
43
44	/* Hero Slider Layout JS */
45	const hero_slider_layout = new Swiper('.hero-slider-layout .swiper', {
46		slidesPerView : 1,
47		speed: 1000,
48		spaceBetween: 0,
49		loop: true,
50		autoplay: {
51			delay: 4000,
52		},
53		pagination: {
54			el: '.hero-pagination',
55			clickable: true,
56		},
57	});
58
59	/* testimonial Slider JS */
60	if ($('.testimonial-slider').length) {
61		const testimonial_slider = new Swiper('.testimonial-slider .swiper', {
62			slidesPerView : 1,
63			speed: 1000,
64			spaceBetween: 30,
65			loop: true,
66			autoplay: {
67				delay: 5000,
68			},
69			pagination: {
70				el: '.swiper-pagination',
71				clickable: true,
72			},
73			navigation: {
74				nextEl: '.testimonial-button-next',
75				prevEl: '.testimonial-button-prev',
76			},
77			breakpoints: {
78				768:{
79				  	slidesPerView: 1,
80				},
81				991:{
82				  	slidesPerView: 1,
83				}
84			}
85		});
86	}
87
88	/* Skill Bar */
89	if ($('.skills-progress-bar').length) {
90		$('.skills-progress-bar').waypoint(function() {
91			$('.skillbar').each(function() {
92				$(this).find('.count-bar').animate({
93				width:$(this).attr('data-percent')
94				},2000);
95			});
96		},{
97			offset: '70%'
98		});
99	}
100
101	/* Youtube Background Video JS */
102	if ($('#herovideo').length) {
103		var myPlayer = $("#herovideo").YTPlayer();
104	}
105
106	/* Init Counter */
107	if ($('.counter').length) {
108		$('.counter').counterUp({ delay: 6, time: 3000 });
109	}
110
111	/* Image Reveal Animation */
112	if ($('.reveal').length) {
113        gsap.registerPlugin(ScrollTrigger);
114        let revealContainers = document.querySelectorAll(".reveal");
115        revealContainers.forEach((container) => {
116            let image = container.querySelector("img");
117            let tl = gsap.timeline({
118                scrollTrigger: {
119                    trigger: container,
120                    toggleActions: "play none none none"
121                }
122            });
123            tl.set(container, {
124                autoAlpha: 1
125            });
126            tl.from(container, 1, {
127                xPercent: -100,
128                ease: Power2.out
129            });
130            tl.from(image, 1, {
131                xPercent: 100,
132                scale: 1,
133                delay: -1,
134                ease: Power2.out
135            });
136        });
137    }
138
139	/* Parallaxie js */
140	var $parallaxie = $('.parallaxie');
141	if($parallaxie.length && ($window.width() > 991))
142	{
143		if ($window.width() > 768) {
144			$parallaxie.parallaxie({
145				speed: 0.55,
146				offset: 0,
147			});
148		}
149	}
150
151	/* Zoom Gallery screenshot */
152	$('.gallery-items').magnificPopup({
153		delegate: 'a',
154		type: 'image',
155		closeOnContentClick: false,
156		closeBtnInside: false,
157		mainClass: 'mfp-with-zoom',
158		image: {
159			verticalFit: true,
160		},
161		gallery: {
162			enabled: true
163		},
164		zoom: {
165			enabled: true,
166			duration: 300, // don't foget to change the duration also in CSS
167			opener: function(element) {
168			  return element.find('img');
169			}
170		}
171	});
172
173	/* Contact form validation */
174	var $contactform = $("#contactForm");
175	$contactform.validator({focus: false}).on("submit", function (event) {
176		if (!event.isDefaultPrevented()) {
177			event.preventDefault();
178			submitForm();
179		}
180	});
181
182	function submitForm(){
183		/* Ajax call to submit form */
184		$.ajax({
185			type: "POST",
186			url: "form-process.php",
187			data: $contactform.serialize(),
188			success : function(text){
189				if (text == "success"){
190					formSuccess();
191				} else {
192					submitMSG(false,text);
193				}
194			}
195		});
196	}
197
198	function formSuccess(){
199		$contactform[0].reset();
200		submitMSG(true, "Message Sent Successfully!")
201	}
202
203	function submitMSG(valid, msg){
204		if(valid){
205			var msgClasses = "h4 text-success";
206		} else {
207			var msgClasses = "h4 text-danger";
208		}
209		$("#msgSubmit").removeClass().addClass(msgClasses).text(msg);
210	}
211	/* Contact form validation end */
212
213	/* Appointment form validation */
214	var $appointmentForm = $("#appointmentForm");
215	$appointmentForm.validator({focus: false}).on("submit", function (event) {
216		if (!event.isDefaultPrevented()) {
217			event.preventDefault();
218			submitappointmentForm();
219		}
220	});
221
222	function submitappointmentForm(){
223		/* Ajax call to submit form */
224		$.ajax({
225			type: "POST",
226			url: "form-appointment.php",
227			data: $appointmentForm.serialize(),
228			success : function(text){
229				if (text == "success"){
230					appointmentformSuccess();
231				} else {
232					appointmentsubmitMSG(false,text);
233				}
234			}
235		});
236	}
237
238	function appointmentformSuccess(){
239		$appointmentForm[0].reset();
240		appointmentsubmitMSG(true, "Message Sent Successfully!")
241	}
242
243	function appointmentsubmitMSG(valid, msg){
244		if(valid){
245			var msgClasses = "h3 text-success";
246		} else {
247			var msgClasses = "h3 text-danger";
248		}
249		$("#msgSubmit").removeClass().addClass(msgClasses).text(msg);
250	}
251	/* Appointment form validation end */
252
253	/* Animated Wow Js */	
254	new WOW().init();
255
256	/* Popup Video */
257	if ($('.popup-video').length) {
258		$('.popup-video').magnificPopup({
259			type: 'iframe',
260			mainClass: 'mfp-fade',
261			removalDelay: 160,
262			preloader: false,
263			fixedContentPos: true
264		});
265	}
266	
267})(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.