PageSourceSearch

https://www.sweetsolution.biz/data/skin/front/sme/js/mainV.js?ts=1660902438

js sweetsolution.biz collected 2026-10-06 14:06:00 UTC 4,056 bytes, 130 lines download raw bytes

1
2
3	
4	var lastScroll = 0;
5	var $navbarFixedTop = $('.scroll-wrap');
6
7	 $(window).scroll(function(event){
8		  var scroll = $(this).scrollTop();
9		  if (scroll > 0){
10		  //À̺¥Æ®¸¦ Àû¿ë½Ãų ½ºÅ©·Ñ ³ôÀÌ
11			   $("#header_wrap" ).addClass( 'scroll-wrap' );
12		  }
13		  else {
14			  $( '#header_wrap' ).removeClass( 'scroll-wrap' );
15		  }
16		  lastScroll = scroll;
17	 });
18
19    if ($(window).scrollTop() > 10 ){
20      $("#header_wrap" ).addClass( 'scroll-wrap' );
21    } else {
22       $( '#header_wrap' ).removeClass( 'scroll-wrap' );
23    }
24
25
26    $('.toggle_on').on('click', function(e) {
27        $(this).toggleClass('on');
28    });
29
30
31    function mainVisual() {
32        var prog = document.querySelector('.visual_paginations').querySelector('.progress');
33        var bar = prog.querySelector('.bar');
34        var delay = 5000;
35        var speed = 1000;
36        var ingProgress = 0;
37        var ingTimes = 0;
38        var matrix;
39        var flag = true;
40        $('#mainVisual .progress').attr('data-end',$('#mainVisual .swiper-slide').length);
41
42        var mainVisual = createMainVisual();
43
44        function createMainVisual() {
45            return visual = new Swiper('#mainVisual .swiper-container', {
46                slidesPerView: 1,
47                slidesPerGroup: 1,
48                speed: speed,
49                loop: true,
50                effect: 'fade',
51                navigation: {
52                    nextEl: ".control_next",
53                    prevEl: ".control_prev",
54                },
55                autoplay:true,
56                autoplay: {
57                    delay: delay,
58                    disableOnInteraction: false,
59                },
60                on: {
61                    init: function() {
62                        ingTimes = delay;
63                        initProgress(this);
64                    },
65                    slideChange: function() {
66                        ingProgress = 0;
67                        flag = true;
68                        if(mainVisual.autoplay.delay != delay) {
69                            mainVisual.autoplay.delay = delay;
70                            $('#mainVisual [data-swiper-autoplay]').removeAttr('data-swiper-autoplay');
71                        }
72                        initProgress(this);
73                    }
74                }
75            })
76        }
77
78        function initProgress(arg) {
79            if(!(arg == typeof undefined || arg == undefined)) {
80                prog.querySelector('.ing').innerHTML =  arg.realIndex + 1;
81            }
82
83            $({scale: ingProgress}).stop().animate({scale: 1}, {
84                duration: ingTimes != 0 ? ingTimes : delay + speed,
85                easing: 'linear',
86                step: function(now) {
87                    if(flag) {
88                        $(bar).css({
89                            transform: 'scaleX('+ now+')'
90                        });
91                    }
92                }
93            })
94            ingTimes = 0;
95        }
96        $('.visual_plays').on('click', function() {
97            if($(this).hasClass('on')) {
98                mainVisual.autoplay.stop();
99                matrix = $(bar).css('transform').replace('matrix','').replace('(','').replace(')','');
100                matrix = matrix.split(',');
101                ingProgress = matrix[0];
102                ingTimes = (delay + speed) - Math.floor(ingProgress * 1000) / 1000 * (delay + speed);
103                flag = false;
104            }else {
105                mainVisual.autoplay.delay = ingTimes;
106                $('#mainVisual .swiper-slide-active').attr('data-swiper-autoplay',ingTimes);
107                mainVisual.autoplay.start();
108                flag = true;
109                initProgress();
110            }
111        })
112    }
113    mainVisual();
114
115	$(function skrollrInit() {
116
117		//initialize skrollr
118		skrollr.init({
119			smoothScrolling: true
120		});
121
122		// disable skrollr if using handheld device
123		if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
124			skrollr.init().destroy();
125		}
126
127	});
128
129	//execute function
130	skrollrInit();

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.