PageSourceSearch

https://img.eduwill.net/eduwill/live/js/web/header.js

js eduwill.net collected 2026-09-30 05:30:37 UTC 2,777 bytes, 107 lines download raw bytes

1// $(function(){ 
2//     headerInit();
3// 	bannerInit();
4// });
5
6$(document).ready(function(){
7    headerInit();
8	bannerInit();
9});
10
11function headerInit(){
12    headerEvent();
13}
14
15function headerEvent(){
16    $('[data-header-layer]').each(function(){
17        var _data = $(this).data('headerLayer'),
18            $parent = $(this).parent();
19
20        if( _data == 'toggle' ){
21            $(this).click(function(){
22                $parent.toggleClass('active');
23                $parent.siblings().removeClass('active');
24            });
25        } else if( _data == 'hover' ){
26            $parent.mouseenter(function(){
27                $parent.addClass('active');
28                $parent.siblings().removeClass('active');
29                // console.log('hover');
30            }).mouseleave(function(){
31                $parent.removeClass('active');
32                if( $('.header-layer').mouseout ){
33                    $parent.removeClass('active');
34                    //console.log('out');
35                }
36            });
37        }
38    });
39
40    $('.btn-series-tg a').on('click', function(){
41        $('.series-list').slideToggle();
42        $('.btn-series-tg').toggleClass('off');
43        return false;
44    });
45
46    $('.series-box .series-toggle').on('click', function(e){
47        e.preventDefault();
48
49        $(this).siblings().slideToggle();
50        $(this).parent().toggleClass('fold');
51
52        if( $('.series-box').hasClass('fold')) {
53            $(this).find('span').text('열기');
54        } else {
55            $(this).find('span').text('닫기');
56        }
57    });
58
59	// OP-74120
60	var $multipleHeader = $('.eduwill-header.multiple-header .gnb');
61
62	$multipleHeader.each(function(index){
63		var $gnbItem = $(this).find('.gnb-list .item'),
64			 _itemWidth = 0;
65
66		$gnbItem.each(function(index){
67			_itemWidth += parseInt($(this).width(), 10);
68		});
69
70		// console.log( _itemWidth, _bannerWidth );
71
72		$(this).children().find('.menu-list').css({
73			'width': _itemWidth - 60
74		});
75	});
76}
77
78
79function bannerInit(){
80	$(".banner-wrap .swiper").each(function(index, ele){
81		var $this = $(this);
82		$this.addClass('banner-' + index);
83		var swiper = new Swiper(".banner-wrap .banner-" + index, {
84			lazy : {
85				loadPrevNext : true
86			},
87			spaceBetween: 15,
88			observer: true,
89			observeParents: true,
90			autoplay: {
91				delay: 3000,
92			},
93			pagination: {
94				el: ".swiper-pagination",
95				clickable: true,
96			},
97		});
98
99		var len = $('.banner-wrap .banner-' + index).find(".swiper-slide").length;
100		if(len > 1){
101			 $('.banner-wrap .banner-' + index).find(".swiper-pagination").show();
102		}else{
103			 $('.banner-wrap .banner-' + index).find(".swiper-pagination").hide();
104		}
105		
106	});
107}

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.