PageSourceSearch

https://radionode365.com/js/main.js

js radionode365.com collected 2026-10-09 22:41:12 UTC 10,288 bytes, 305 lines download raw bytes

1/* *******************************************************
2 * filename : main.js
3 * description : 메인에만 사용되는 JS
4 * date : 2020-11-25
5******************************************************** */
6
7$(document).ready(function  () {
8	/* ************************
9	* Func : fullpage 레이아웃 사용시
10	* fullpage.js, checkOffset(), toFit() 필요
11	************************ */
12	if ($.exists('#fullpage')) {
13		var $fullPage = $("#fullpage");
14		var $fullPageSection = $fullPage.children(".section");
15		if ( detectBrowser() === "ie") {
16			var scroll_speed = 500;
17		}else {
18			var scroll_speed = 800;
19		}
20		$fullPage.fullpage({
21			css3: true,
22			fitToSection: false,
23			navigation: true,
24			scrollBar:false,
25			scrollingSpeed:scroll_speed,
26			navigationPosition: 'right',
27			responsiveWidth: tabletWidth,
28			responsiveHeight : 750,
29			onLeave : function(origin, destination, direction){
30				if ( !($fullPageSection.eq(destination-1).is(".active-section")) ) {
31					setTimeout(function  () {
32						$(".section").eq(destination-1).find(".aos-init").addClass('aos-animate');
33					},500);
34				}
35
36				$('.slick-slider').slick('slickGoTo', 0);
37				// Use Case 슬라이드 초기화
38				if (destination == 4) {
39					if (!($mainCaseSlide.find(".txt-item").eq(0).hasClass("first"))) {// 제품슬라이드 초기화
40						$(".main-case-item").eq(0).addClass("active-item");
41					}
42				}
43				// 사이드바 색상변경
44				if ( destination == 2 || destination == 3 ) {
45					$("#header").addClass("black");
46					$("#fp-nav").addClass("black");
47					$(".main-scroll-icon").addClass("black");
48					$(".main-scroll-icon").removeClass("top");
49					$(".translate-select-wrap").addClass("black");
50				}else if (destination == 4) {
51					$(".main-scroll-icon").addClass("top");
52					$(".main-scroll-icon").removeClass("black");
53					$("#header").removeClass("black");
54					$("#fp-nav").removeClass("black");
55					$(".translate-select-wrap").removeClass("black");
56				}else {
57					$("#header").removeClass("black");
58					$("#fp-nav").removeClass("black");
59					$(".main-scroll-icon").removeClass("black top");
60					$(".translate-select-wrap").removeClass("black");
61				}
62				if ( destination == 2 ) {
63					if (!($("#mainProduct01 .main-product-txt-slide .txt-item").eq(0).hasClass("first"))) {// 제품슬라이드 초기화
64						$("#mainProduct01 .main-product-txt-slide .txt-item").eq(0).addClass("active-item"); 
65					}
66				}
67				if ( destination == 3 ) {
68					if (!($("#mainProduct02 .main-product-txt-slide .txt-item").eq(0).hasClass("first"))) {// 제품슬라이드 초기화
69						$("#mainProduct02 .main-product-txt-slide .txt-item").eq(0).addClass("active-item"); 
70					}
71				}
72				//푸터에서 숨기기
73				if ( destination > 4) {
74					$("#header").addClass("hide");
75					$("#fp-nav").addClass("hide");
76					$(".main-scroll-icon").addClass("hide top")
77				}else {
78					$("#header").removeClass("hide");
79					$("#fp-nav").removeClass("hide");
80					$(".main-scroll-icon").removeClass("hide");
81				}
82
83			}
84		});
85	}
86	/* *********************** 메인 비주얼 ************************ */
87	// 메인 비주얼 높이값 설정
88	if ($.exists('#mainVisual.full-height')) {
89		mainVisualHeight();
90		$(window).on('resize', mainVisualHeight);
91
92		function mainVisualHeight () {
93			var visual_height = getWindowHeight()	- $("#header").height();	// header가 fixed or absolute일경우 - $("#header").height() 삭제
94			$("#mainVisual").height(visual_height);
95			
96		}
97	}
98	
99	// 메인 비주얼 슬라이드
100	var $mainVisual = $("#mainVisual");
101	var $mainVisualItem = $(".main-visual-con");
102 	var $circleBox = $mainVisual.find(".circle-box");
103	var $circleItem = $circleBox.find(".circle");
104	var $playBtn = $(".control-box").find(".play-btn");
105	var $circleIcon = $playBtn.find('i');
106
107	// Loading Circle
108	function mainLoading () {
109		var animation = new TimelineMax({paused: false,repeat:0});
110		var animationTime = 5;
111		animation.to($circleItem, 0, {strokeDashoffset: 360});
112		animation.to($circleItem, animationTime, {strokeDashoffset: 0,ease:Power0.easeNone});
113	}
114	$mainVisualItem.on('init', function(event, slick, currentSlide,nextSlide) {
115		$(".main-visual-item").eq(0).addClass("active-item");
116		if ($.exists('.main-visual-control')) {
117			$(".main-visual-control .total-num").text('0'+slick.slideCount);
118		}
119		mainLoading ();
120	});
121	$mainVisualItem.on('beforeChange', function(event, slick, currentSlide, nextSlide) {	
122		$(".main-visual-item").removeClass("active-item");
123		$(this).find(".main-visual-item").eq(nextSlide).addClass("active-item");
124		if ($.exists('.main-visual-control')) {
125			$(".main-visual-control .cur-num").text('0'+(nextSlide+1));
126		}
127		mainLoading ();
128	});
129
130	// 메인 비주얼 슬라이드
131	$mainVisualItem.slick({
132		slidesToShow: 1,
133		slidesToScroll: 1,
134		arrows: true,
135		fade: true,
136		dots:false,
137		autoplay: true,
138		speed:2000,
139		infinite:true,
140		autoplaySpeed: 5000,
141		easing: 'easeInOutQuint',
142		pauseOnHover:false,
143		zIndex:1,
144		appendArrows: '.main-visual-control .arrow-box',
145		prevArrow: '<button type="button" data-role="none" class="slick-prev" aria-label="Prev" tabindex="0" role="button"><i class="xi-angle-left-min"></i></button>',
146		nextArrow: '<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button"><i class="xi-angle-right-min"></i></button>',
147	});
148
149	$mainVisualItem.find(".slick-dots").wrap("<aside class='slick-dots-wrapper'><div class='area-box'></div></aside>");
150
151	// 일시정지, 재생버튼
152	$playBtn.click(function  () {
153		var currentSlide = $mainVisualItem.slick
154		if (!($(this).hasClass("pause"))) {
155			$mainVisualItem.slick("slickPause");
156			$playBtn.addClass("pause");
157			
158		}else {
159			$mainVisualItem.slick("slickPlay");
160			$playBtn.removeClass("pause");
161			mainLoading ();
162		}
163	})
164			
165
166
167	/* *********************** 메인 비주얼 공지사항 슬라이드 ************************ */
168	$('.main-visual-notice-slide > ul').slick({
169		slidesToShow: 1,
170		slidesToScroll: 1,
171		arrows: true,
172		fade: false,
173		dots:false,
174		autoplay: true,
175		speed:1000,
176		infinite:true,
177		autoplaySpeed: 3000,
178		easing: 'easeInOutQuint',
179		pauseOnHover:false,
180		vertical:true,
181		appendArrows: '.main-visual-notice .arrow-box',
182		prevArrow: '<button type="button" data-role="none" class="slick-prev" aria-label="Prev" tabindex="0" role="button"><i class="xi-angle-left-min"></i></button>',
183		nextArrow: '<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button"><i class="xi-angle-right-min"></i></button>',
184		responsive: [
185					{
186					  breakpoint: 1025,
187					  settings: {
188						arrows: false,
189					  }
190					},
191				  ]
192	});
193
194	/* *********************** 메인 Product 슬라이드 ************************ */
195	$(".main-product-con").each(function  () {
196		var $mainPrdImgSlide  = $(this).find('.main-product-img-slide');
197		var $mainPrdTxtSlide  = $(this).find('.main-product-txt-slide');
198		var $mainPrdTxtSlide01  = $('#mainProduct01 .main-product-txt-slide');
199		var $mainPrdTxtSlide02  = $('#mainProduct02 .main-product-txt-slide');
200		var $mainPrdDots = $(this).find('.main-product-dots');
201	
202		$mainPrdImgSlide.on('init', function(event, slick) {
203			$mainPrdDots.find('li').eq(0).addClass("first");
204		});
205		$mainPrdImgSlide.on('beforeChange', function(event, slick) {	
206			$mainPrdDots.find('li').removeClass("first");
207		});
208		$mainPrdTxtSlide.on('init', function(event, slick) {
209			$mainPrdTxtSlide.find('.txt-item').removeClass("first");
210		});
211		$mainPrdTxtSlide01.on('beforeChange', function(event, slick, currentSlide, nextSlide) {	
212			$mainPrdTxtSlide01.find(".txt-item").removeClass("active-item");
213			$(this).find(".txt-item").eq(nextSlide).addClass("active-item");
214		});
215		$mainPrdTxtSlide02.on('beforeChange', function(event, slick, currentSlide, nextSlide) {	
216			$mainPrdTxtSlide02.find(".txt-item").removeClass("active-item");
217			$(this).find(".txt-item").eq(nextSlide).addClass("active-item");
218		});
219		$mainPrdImgSlide.slick({
220			slidesToShow: 1,
221			slidesToScroll: 1,
222			arrows: false,
223			fade: true,
224			dots:true,
225			autoplay: true,
226			speed:1000,
227			infinite:true,
228			autoplaySpeed: 4000,
229			easing: 'easeInOutQuint',
230			pauseOnHover:false,
231			appendDots:$mainPrdDots,
232			customPaging : function(slider, i) {
233				var index = i + 1;
234				if (index < 10) {
235					index = "0"+index;
236				}
237				return '<span>'+index+'</span>';
238			},
239			asNavFor: $mainPrdTxtSlide
240		});
241		$mainPrdTxtSlide.slick({
242			slidesToShow: 1,
243			slidesToScroll: 1,
244			arrows: false,
245			fade: true,
246			dots:false,
247			autoplay: true,
248			speed:1000,
249			infinite:true,
250			autoplaySpeed: 4000,
251			easing: 'easeInOutQuint',
252			pauseOnHover:false,
253			asNavFor:$mainPrdImgSlide
254		});	
255
256	})
257
258	/* *********************** 메인 Use case 슬라이드 ************************ */
259	var $mainCaseSlide = $(".main-case-slide");
260	var $mainCaseBar = $(".main-case-control .loading-bar em");
261	function mainCaseLoading () {
262		// Loading Motion
263		TweenMax.killTweensOf($mainCaseBar);
264		TweenMax.set($mainCaseBar, { width: "0%" });
265		TweenMax.to($mainCaseBar, 4, { width: "100%" });
266	}
267	$mainCaseSlide.on('init', function(event, slick, currentSlide,nextSlide) {
268		if ($.exists('.main-case-control')) {
269			$(".main-case-control .total-num").text('0'+slick.slideCount);
270			mainCaseLoading ();
271		}
272	});
273	$mainCaseSlide.on('beforeChange', function(event, slick, currentSlide, nextSlide) {	
274		$(".main-case-item").removeClass("active-item");
275		$(".main-case-item").removeClass("first");
276		$(this).find(".main-case-item").eq(nextSlide).addClass("active-item");
277		
278		if ($.exists('.main-case-control')) {
279			$(".main-case-control .cur-num").text('0'+(nextSlide+1));
280			mainCaseLoading ();
281		}
282	});
283
284
285	$mainCaseSlide.slick({
286		slidesToShow: 1,
287		slidesToScroll: 1,
288		arrows: true,
289		fade: true,
290		dots:false,
291		autoplay: true,
292		speed:2000,
293		infinite:true,
294		autoplaySpeed: 5000,
295		easing: 'easeInOutQuint',
296		pauseOnHover:false,
297		appendArrows: '.main-case-con .inner-box',
298		prevArrow: '<button type="button" data-role="none" class="slick-prev" aria-label="Prev" tabindex="0" role="button"><i class="xi-angle-left-min"></i></button>',
299		nextArrow: '<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button"><i class="xi-angle-right-min"></i></button>',
300		
301	});
302
303
304	
305});

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.