PageSourceSearch

https://portal.igse.ac.kr/assets/js/scripts.js

js igse.ac.kr collected 2026-09-25 06:21:04 UTC 13,675 bytes, 460 lines download raw bytes

1/*===================================
2Author       : Bestwebcreator.
3Template Name: Eduglobal - Education & Courses HTML Template
4Version      : 1.2
5===================================*/
6
7/*===================================*
8PAGE JS
9*===================================*/
10
11(function($) {
12	'use strict';
13	
14	/*===================================*
15	01. LOADING JS
16	/*===================================*/
17	$(window).on('load', function() {
18		var preLoder = $("#preloader");
19		preLoder.delay(700).fadeOut(500).addClass('loaded');
20	});
21
22	/*===================================*
23	02. SMOOTH SCROLLING JS
24	*===================================*/
25	// Select all links with hashes
26	var headerHeight = $(".header_wrap").height() - 65;
27    $('a.page-scroll').on('click', function(event) {
28        // On-page links
29        if ( location.pathname.replace(/^\//, '') === this.pathname.replace(/^\//, '') && location.hostname === this.hostname ) {
30          // Figure out element to scroll to
31          var target = $(this.hash),
32              speed= $(this).data("speed") || 800;
33              target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
34
35          // Does a scroll target exist?
36          if (target.length) {
37            // Only prevent default if animation is actually gonna happen
38            event.preventDefault();
39            $('html, body').animate({
40              scrollTop: target.offset().top - headerHeight
41            }, speed);
42          }
43        }
44    });
45	
46	$(window).on("load resize ready",function () {
47		$(".header_wrap.fixed-top").css({"padding-top": $(".alertbox").height() });
48	})
49	$('.alertbox .close').on("click",function () {
50		$(".header_wrap ").css({"padding-top": "0" });
51	})
52
53	$(function () {
54		if ($('.header_wrap').hasClass('fixed-top')) {
55			$('.alertbox').addClass('alert_fixed');
56		}
57	});
58	
59	/*===================================*
60	03. MENU JS
61	*===================================*/
62	//Main navigation scroll spy for shadow
63	
64	/* 스크롤 업 버그 수정  2020.02.09 최종삼 - 임시 주석
65	$(window).on('scroll', function() {
66		var scroll = $(window).scrollTop();
67
68	    if (scroll >= 80) {
69	        $('header').addClass('nav-fixed');
70			$('.alert_fixed').addClass('fixed');
71	    } else {
72	        $('header').removeClass('nav-fixed');
73			$('.alert_fixed').removeClass('fixed');;
74	    }
75
76	});
77	*/
78	
79	//Show Hide dropdown-menu Main navigation 
80	$( document ).ready( function () {
81		$( '.dropdown-menu a.dropdown-toggler' ).on( 'click', function ( e ) {
82			var $el = $( this );
83			var $parent = $( this ).offsetParent( ".dropdown-menu" );
84			if ( !$( this ).next().hasClass( 'show' ) ) {
85				$( this ).parents( '.dropdown-menu' ).first().find( '.show' ).removeClass( "show" );
86			}
87			var $subMenu = $( this ).next( ".dropdown-menu" );
88			$subMenu.toggleClass( 'show' );
89			
90			$( this ).parent( "li" ).toggleClass( 'show' );
91	
92			$( this ).parents( 'li.nav-item.dropdown.show' ).on( 'hidden.bs.dropdown', function ( e ) {
93				$( '.dropdown-menu .show' ).removeClass( "show" );
94			} );
95			
96			return false;
97		});
98	});
99	
100	//Hide Navbar Dropdown After Click On Links
101	var navBar = $(".header_wrap");
102	var navbarLinks = navBar.find(".navbar-collapse ul li a.page-scroll");
103
104    $.each( navbarLinks, function( i, val ) {
105
106      var navbarLink = $(this);
107
108        navbarLink.on('click', function () {
109          navBar.find(".navbar-collapse").collapse('hide');
110		  $("header").removeClass("active");
111        });
112
113    });
114	
115	//Main navigation Active Class Add Remove
116	$('.navbar-toggler').on('click', function() {
117		$("header").toggleClass("active");
118	});	
119	
120	$(window).on("load resize ready",function () {
121	function getClass(element, startsWith) {
122
123		var result = undefined;
124		$(element.attr('class').split(' ')).each(function() {
125
126			if (this.indexOf(startsWith) > -1) result = this;
127		});
128		return result;
129	}
130	$('.header_wrap').each(function() {
131		var className = getClass( $(this), 'bg_') || getClass( $(this), 'bg-');
132		if($('.header_wrap').hasClass(className))
133		{
134			Array.prototype.forEach.call(document.querySelectorAll(".dropdown-menu"), function(el) {
135				el.classList.add(className);
136			});
137		}
138		if ($(window).width() <= 992){
139			$('.navbar-nav').addClass(className);
140		}
141	});
142	});
143
144	/*===================================*
145	04. SEARCH JS
146	*===================================*/
147    $(".search_trigger").on("click", function() {
148		$(".search-overlay").toggleClass('open');
149		$(".search_trigger").toggleClass('open');
150	});
151	
152	/*===================================*
153	05. SLIDER JS
154	*===================================*/
155	$( window ).on( "load", function() {
156		$('.carousel_slider').each( function() {
157			var $carousel = $(this);
158			$carousel.owlCarousel({
159				dots : $carousel.data("dots"),
160				loop : $carousel.data("loop"),
161				margin: $carousel.data("margin"),
162				items: $carousel.data("items"),
163				mouseDrag: $carousel.data("mouse-drag"),
164				touchDrag: $carousel.data("touch-drag"),
165				center: $carousel.data("center"),
166				autoHeight: $carousel.data("autoheight"),
167				rewind: $carousel.data("rewind"),
168				nav: $carousel.data("nav"),
169				navText: ['<i class="ion-ios-arrow-back"></i>', '<i class="ion-ios-arrow-forward"></i>'],
170				autoplay : $carousel.data("autoplay"),
171				animateIn : $carousel.data("animate-in"),
172				animateOut: $carousel.data("animate-out"),
173				autoplayTimeout : $carousel.data("autoplay-timeout"),
174				smartSpeed: $carousel.data("smart-speed"),
175				responsive: $carousel.data("responsive")
176			});
177		});
178	});
179	
180	/*===================================*
181	06. PORTFOLIO JS
182	*===================================*/
183	var $grid_selectors  = $(".grid_container");
184    var filter_selectors = ".grid_filter > li > a";
185	if( $grid_selectors.length > 0 ) {
186		$grid_selectors.imagesLoaded(function(){
187			if ($grid_selectors.hasClass("masonry")){
188				$grid_selectors.isotope({
189					itemSelector: '.grid_item',
190					layoutMode: "masonry",
191					masonry: {
192						columnWidth: '.grid-sizer'
193					},
194					filter: "*"
195				});
196			} 
197			else {
198				$grid_selectors.isotope({
199					itemSelector: '.grid_item',
200					layoutMode: "fitRows",
201					filter: "*"
202				});
203			}
204		});
205	}
206            
207	//isotope filter
208	$(document).on( "click", filter_selectors, function() {
209		$(filter_selectors).removeClass("current");
210		$(this).addClass("current");
211		var dfselector = $(this).data('filter');
212		if ($grid_selectors.hasClass("masonry")){
213			$grid_selectors.isotope({
214				itemSelector: '.grid_item',
215				layoutMode: "masonry",
216				masonry: {
217					columnWidth: '.grid_item'
218				},
219				filter: dfselector
220			});
221		} 
222		else {
223			$grid_selectors.isotope({
224				itemSelector: '.grid_item',
225				layoutMode: "fitRows",
226				filter: dfselector
227			});
228		}
229		return false;
230	});
231	
232
233	$(window).resize(function () {
234		$grid_selectors.ready(function () {
235			setTimeout(function () {
236				$grid_selectors.find('.grid_item').removeClass('animation').removeClass('animated'); // avoid problem to filter after window resize
237				$grid_selectors.isotope('layout');
238			}, 300);
239		});
240	});
241	
242	$('.grid_item .image_popup').on('click', function () {
243		$(this).find('.link_container').magnificPopup('open');
244	});
245	$('.link_container').each(function () {
246		$(this).magnificPopup({
247			delegate: '.image_popup',
248			type: 'image',
249			gallery: {
250				enabled: true
251			}
252		});
253	});
254	 
255	/*===================================*
256     07.COUNTDOWN JS
257    *===================================*/
258    $('.countdown_time').each(function() {
259        var endTime = $(this).data('time');
260        $(this).countdown(endTime, function(tm) {
261            $(this).html(tm.strftime('<span class="countdown_box"><span class="countdown days">%D </span><span class="cd_text">Days</span></span><span class="countdown_box"><span class="countdown hours">%H</span><span class="cd_text">Hours</span></span><span class="countdown_box"><span class="countdown minutes">%M</span><span class="cd_text">Minutes</span></span><span class="countdown_box"><span class="countdown seconds">%S</span><span class="cd_text">Seconds</span></span>'));
262        });
263    });
264	
265	/*===================================*
266	08. CONTACT FORM JS
267	*===================================*/
268	$("#submitButton").on("click", function(event) {
269	    event.preventDefault();
270	    var mydata = $("form").serialize();
271	    $.ajax({
272	        type: "POST",
273	        dataType: "json",
274	        url: "contact.php",
275	        data: mydata,
276	        success: function(data) {
277	            if (data.type === "error") {
278	                $("#alert-msg").removeClass("alert-msg-success");
279	                $("#alert-msg").addClass("alert-msg-failure");
280	            } else {
281	                $("#alert-msg").addClass("alert-msg-success");
282	                $("#alert-msg").removeClass("alert-msg-failure");
283	                $("#first-name").val("Enter Name");
284	                $("#email").val("Enter Email");
285					$("#phone").val("Enter Phone Number");
286	                $("#subject").val("Enter Subject");
287	                $("#description").val("Enter Message");
288
289	            }
290	            $("#alert-msg").html(data.msg);
291	            $("#alert-msg").show();
292	        },
293	        error: function(xhr, textStatus) {
294	            alert(textStatus);
295	        }
296	    });
297	});
298	
299	/*===================================*
300	09. SCROLLUP JS
301	*===================================*/
302	$(window).scroll(function() {
303		if ($(this).scrollTop() > 150) {
304			$('.scrollup').fadeIn();
305		} else {
306			$('.scrollup').fadeOut();
307		}
308	});
309	
310	$(".scrollup").on('click', function (e) {
311		e.preventDefault();
312		$('html, body').animate({
313			scrollTop: 0
314		}, 600);
315		return false;
316	});
317	
318	/*===================================*
319	10. POPUP JS
320	*===================================*/
321	$('.content-popup').magnificPopup({
322		type: 'inline',
323		preloader: true,
324		mainClass: 'mfp-zoom'
325	});
326	
327	$('.image_gallery').each(function() { // the containers for all your galleries
328		$(this).magnificPopup({
329			delegate: 'a', // the selector for gallery item
330			type: 'image',
331			gallery: {
332				enabled:true
333			},
334			zoom: {
335				enabled: true,
336				duration: 300, // don't foget to change the duration also in CSS
337				opener: function(element) {
338					return element.find('img');
339				}
340			}
341		});
342	});
343	
344	$(document).ready(function() {
345		$('.popup-ajax').magnificPopup({
346			type: 'ajax',
347		});
348	});
349
350	/*==============================================================
351    11. VIDEO JS
352    ==============================================================*/
353	$(document).ready(function() {
354		$('.video_popup, .iframe_popup').magnificPopup({
355			type: 'iframe',
356			mainClass: 'mfp-fade',
357			removalDelay: 160,
358			preloader: false,
359			fixedContentPos: false
360		});
361	});
362	
363	/*===================================*
364	12. ANIMATION JS
365	*===================================*/
366	$(function() {
367	
368		function ckScrollInit(items, trigger) {
369			items.each(function() {
370				var ckElement = $(this),
371					AnimationClass = ckElement.attr('data-animation'),
372					AnimationDelay = ckElement.attr('data-animation-delay');
373	
374				ckElement.css({
375					'-webkit-animation-delay': AnimationDelay,
376					'-moz-animation-delay': AnimationDelay,
377					'animation-delay': AnimationDelay,
378					opacity: 0
379				});
380	
381				var ckTrigger = (trigger) ? trigger : ckElement;
382	
383				ckTrigger.waypoint(function() {
384					ckElement.addClass("animated").css("opacity", "1");
385					ckElement.addClass('animated').addClass(AnimationClass);
386				}, {
387					triggerOnce: true,
388					offset: '90%',
389				});
390			});
391		}
392	
393		ckScrollInit($('.animation'));
394		ckScrollInit($('.staggered-animation'), $('.staggered-animation-wrap'));
395	
396	});
397	
398	/*===================================*
399	13. BACKGROUND IMAGE JS
400	*===================================*/
401	/*data image src*/
402	$(".background_bg").each(function() {
403		var attr = $(this).attr('data-img-src');
404		if (typeof attr !== typeof undefined && attr !== false) {
405			$(this).css('background-image', 'url(' + attr + ')');
406			$(this).css('background-position', 'center center');
407			$(this).css('background-size', 'cover');
408		}
409	});
410	
411	/*===================================*
412	14. PROGRESS BAR JS
413	*===================================*/
414	$(document).ready(function() {
415		$('.progress .progress-bar').css("width",
416			function() {
417				return $(this).attr("aria-valuenow") + "%";
418			}
419		)
420	
421		$('.count_pr').css("left",
422			function() {
423				return $(this).attr("data-percent") + "%";
424			}
425		)
426	});
427
428	/*===================================*
429	15. COUNTER JS
430	*===================================*/
431	$('.counter').counterUp({
432		time: 1500
433	});
434	
435	
436	/*===================================*
437	16. PARALLAX JS
438	*===================================*/
439	$(window).on('load', function() {
440        $('.parallax_bg').parallaxBackground();
441	});
442	
443	/*===================================*
444	17. RATING STAR JS
445	*===================================*/
446	$(document).ready(function(){
447	  
448	  $('.rating span').on('click', function(){
449			var onStar = parseFloat($(this).data('value'), 10); // The star currently selected
450			var stars = $(this).parent().children('.rating span');
451			for (var i = 0; i < stars.length; i++) {
452				$(stars[i]).removeClass('selected');
453			}
454			for (i = 0; i < onStar; i++) {
455				$(stars[i]).addClass('selected');
456			}
457		});
458	});
459
460})(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.