1// var scroll = { 2// disable : function(){ 3// smoothscroll.destroy(); 4// }, 5// enable : function(){ 6// smoothscroll.init(); 7// }, 8// } 9 10 11$(window).on("resize load", function () { 12 var mmmenuIdx = $('#wrap').data('mmenu'); 13 $("#quick ul li").eq(mmmenuIdx).addClass('on'); 14 15 var imgHeight = $("#content02").width()/4; 16 if ($(window).width() <= 1600) { 17 imgHeight = $("#content02").width() / 3; 18 } 19 if ($(window).width() <= 1024) { 20 imgHeight = $("#content02").width() / 2; 21 } 22 23 var mainImgHeight = $("#mainVisual .swiperContainer .center-swiper .swiper-slide .picture").height(); 24 var imgHeight2 = $(".b_tagList .swiper-slide .img, .b_hashList .swiper-slide .img").height(); 25 var btnHeight = $(".swiper-button-next").height()/2; 26 $('#mainVisual .swiperContainer .swiper-button-next, #mainVisual .swiperContainer .swiper-button-prev').css({ 27 top: mainImgHeight/2 - btnHeight, 28 marginTop: 0 29 }); 30 $('#content02 .swiper-button-next, #content02 .swiper-button-prev').css({ 31 top: imgHeight/2 - btnHeight, 32 marginTop: 0 33 }); 34 $('.b_tagList .swiper-button-next, .b_tagList .swiper-button-prev, .b_hashList .swiper-button-next, .b_hashList .swiper-button-prev').css({ 35 top: imgHeight2/2 - btnHeight, 36 marginTop:0 37 }); 38 39 40 // if ($("main.con").find("li > a, li button").hasClass('scrap')) { 41 // var scrapPosi = $(".tagList .scrap, .hashList .scrap, #content02 .swiper-slide .scrap").position().left; 42 // $(".tagList .scrap, .hashList .scrap, #content02 .swiper-slide .scrap").css({ 43 // top: scrapPosi 44 // }); 45 // } 46 // if ($("main.con").find('div').hasClass('view_page')) { 47 // $("header").addClass('trans'); 48 // } 49 // if ($("main.con").find('div').hasClass('view_page2')) { 50 // $("header").addClass('trans2'); 51 // } 52 53 var myBg_w = $("#mypage .mypage_bg").width(); 54 $("#mypage aside").width(myBg_w); 55}); 56$(function () { 57 // 모ë°ì¼ ì¤í¬ë¡¤ ë´ë¦´ë í¤ë ë¡ê³ ì ì¬ë¼ì´ë ì´ë²¤í¸ 58 const headerSlide = new Swiper("#logo-slide .swiper-container", { 59 direction: 'vertical', 60 speed: 800, 61 autoplay: { 62 delay: 3600, 63 disableOnInteraction: false, 64 }, 65 observer: true, 66 observeParents: true, 67 loop: true, 68 }); 69 70 // 모ë°ì¼ ë©ë´ ì´ë²¤í¸ 71 var open = 'open'; 72 $("header .utWrap .ham").on("click",function(){ 73 $(".allMenu").slideToggle(300); 74 $(".allMenu_bg").toggle(); 75 if($("body").hasClass("trans") == true && $(window).scrollTop() <= 100 && $("body").hasClass("hidden") == false){ 76 $("body").addClass("active") 77 }else if($(document).find("body").is('.trans, .active') == true && $(window).scrollTop() <= 100 && $("body").hasClass("hidden") == true){ 78 $("body").removeClass("active") 79 }; 80 if(open == 'open'){ 81 $("body").addClass("hidden"); 82 $("#logo-slide").css('opacity', 0); 83 $("header .logo .logo-about").show(); 84 open = 'off'; 85 }else if(open == 'off'){ 86 $("body").removeClass("hidden"); 87 if($("body").hasClass("active") == true){ 88 $("#logo-slide").css('opacity', 1).removeAttr("style"); 89 $("header .logo .logo-about").hide().removeAttr("style"); 90 } else { 91 $("#logo-slide").css('opacity', 0).removeAttr("style"); 92 $("header .logo .logo-about").show().removeAttr("style"); 93 } 94 open = 'open'; 95 } 96 }); 97 98 $(window).scroll(function(){ 99 var scrollTop = $(document).scrollTop(); 100 101 // 모ë°ì¼ ì¤í¬ë¡¤ì í¤ë ìì¹ë°ì¤ ë³í ì´ë²¤í¸ 102 if (scrollTop >= 100) { 103 $("body").addClass('active'); 104 $(".subTitle").addClass("on"); 105 } else { 106 $("body").removeClass('active'); 107 $(".subTitle").removeClass("on"); 108 } 109 }); 110 111 // í¤ë í´ì°ê¸° ë²í¼ ì´ë²¤í¸ 112 var $h_op_btn = $("header .utWrap .selectWrap button"); 113 var $h_op_Wrap = $("header .utWrap .selectWrap"); 114 115 $("body").on("click",function(){ 116 if($h_op_Wrap.hasClass("on") == false && $h_op_btn.hasClass("act") == false){ 117 $("header .utWrap .selectWrap button").removeClass("on") 118 } 119 }); 120 $h_op_btn.on("click", function () { 121 $h_op_btn.removeClass("act"); 122 $(this).toggleClass("on") 123 $h_op_Wrap.toggleClass("on") 124 }); 125 $h_op_btn.on("mouseover",function(){ 126 $(this).addClass("act"); 127 }); 128 $h_op_btn.on("mouseout",function(){ 129 $h_op_Wrap.removeClass("on"); 130 $h_op_btn.removeClass("act"); 131 }); 132 133 134 // ì¤í¬ë© ì¨ì¤í ì´ë²¤í¸ 135 $('.scrap').on("click", function () { 136 $(this).toggleClass("on") 137 }); 138 139 //ì ë ¬íí° ì´ë²¤í¸ 140 $("#filter li").on("click",function(){ 141 var m_filter = $(this).find('a').text(); 142 $(this).addClass("on").siblings().removeClass("on"); 143 $("#filter p").text(m_filter); 144 }); 145 146 //ê²ìíí° ì´ë²¤í¸ 147 $("#search .search-box .select p").on("mouseover", function(){ 148 $("#search .search-box .select ul").removeClass("off"); 149 }); 150 $("#search .search-box .select ul li").on("click",function(){ 151 var m_filter = $(this).find('a').text(); 152 $(this).addClass("on").siblings().removeClass("on"); 153 $("#search .search-box .select p").text(m_filter); 154 $("#search .search-box .select ul").addClass("off"); 155 }); 156 157 // í¤ìë ì´ë²¤í¸ 158 $("#keyword_wrap .key_list ul li").on("click",function(){ 159 $(this).addClass("on").siblings().removeClass("on"); 160 }); 161 162 // ìì½ëì¸ ì´ë²¤í¸ 163 $(".accordion .item .collapsed").on("click", function () { 164 $(this).parent('.item').toggleClass('active').find('.collapse').slideToggle(300); 165 }); 166 167}); 168 169// Hide Header on on scroll down 170var didScroll; 171var lastScrollTop = 0; 172var delta = 5; // ëìì 구íì´ ììëë ìì¹ 173var navbarHeight = $('header').outerHeight(); // ìí¥ì ë°ì ìì를 ì í 174 175// ì¤í¬ë¡¤ìì ì¬ì©ìê° ì¤í¬ë¡¤íë¤ë ê²ì ì림 176$(window).scroll(function (event) { 177 didScroll = true; 178}); 179 180// hasScrolled()를 ì¤ííê³ didScroll ìí를 ì¬ì¤ì 181setInterval(function () { 182 if (didScroll) { 183 hasScrolled(); 184 didScroll = false; 185 } 186}, 250); 187 188// ëìì 구í 189function hasScrolled() { 190 // ì ê·¼í기 ì½ê² íì¬ ì¤í¬ë¡¤ì ìì¹ë¥¼ ì ì¥íë¤. 191 var st = $(this).scrollTop(); 192 193 // ì¤ì í delta ê°ë³´ë¤ ë ì¤í¬ë¡¤ëìëì§ë¥¼ íì¸íë¤. 194 if (Math.abs(lastScrollTop - st) <= delta) { 195 return; 196 } 197 198 // í¤ëì ëì´ë³´ë¤ ë ì¤í¬ë¡¤ëìëì§ íì¸íê³ ì¤í¬ë¡¤ì ë°©í¥ì´ ìì¸ì§ ìëì¸ì§ë¥¼ íì¸íë¤. 199 if (st > lastScrollTop && st > navbarHeight) { 200 // Scroll Down 201 $('header').removeClass('nav-down').addClass('nav-up'); 202 $('#quick').removeClass('quick-up').addClass('quick-down'); 203 $('#mypage aside').removeClass('head-down').addClass('head-up'); 204 $('.detail_control .list_btn, .list_control .list_btn').removeClass('list_btn_down').addClass('list_btn_up'); 205 if($(window).width() <= 800){ 206 $("footer .ft_top").fadeOut(400); 207 $('#selectWrap, .detail_control .right, .share_control').fadeOut(400); 208 } 209 } else { 210 // Scroll Up 211 if (st + $(window).height() < $(document).height()) { 212 $('header').removeClass('nav-up').addClass('nav-down'); 213 $('#quick').removeClass('quick-down').addClass('quick-up'); 214 $('#mypage aside').removeClass('head-up').addClass('head-down'); 215 $('.detail_control .list_btn, .list_control .list_btn').removeClass('list_btn_up').addClass('list_btn_down'); 216 217 if ($(window).width() <= 800) { 218 $("footer .ft_top").fadeIn(400); 219 $('#selectWrap, .detail_control .right, .share_control').fadeIn(400).css({ 220 bottom: '16rem' 221 }); 222 } 223 } 224 }; 225 226 var scrollTop = $(document).scrollTop(); 227 228 229 // íë²í¼ ì¤í¬ë¡¤ì ë ¸ì¶ ì´ë²¤í¸ 230 if (scrollTop < 100) { 231 if ($(window).width() <= 800) { 232 $("footer .ft_top").fadeOut(400); 233 $("#selectWrap, .detail_control .right, .share_control").css({ 234 bottom: '10rem' 235 }); 236 } 237 } 238 239 // ë·°íì´ì§ íë¡í ë©ë´ ì´ë²¤í¸ 240 var cmt = $(".cook_view_profile"); 241 var cmt2 = $("#labView > .hr_line"); 242 var fadeStartTop; 243 if($(window).width() > 800){ 244 if(cmt.length > 0 && cmt2.length == 0){ 245 var fadeStartTop = cmt.offset().top - 600; 246 }else if(cmt2.length > 0 && cmt.length == 0){ 247 var fadeStartTop = cmt2.offset().top - 600; 248 } 249 250 251 if(scrollTop > fadeStartTop){ 252 $(".share_control").fadeOut(100) 253 }else{ 254 $(".share_control").fadeIn(100) 255 } 256 }; 257 258 // lastScrollTop ì íì¬ ì¤í¬ë¡¤ìì¹ë¥¼ ì§ì íë¤. 259 lastScrollTop = st; 260}; 261 262// ì¤í¬ë¡¤ ë©ì¶¤ ê°ì§ í ì´ë²¤í¸ ì¤í 263$.fn.scrollStopped = function(callback) { 264 var that = this, $this = $(that); 265 $this.scroll(function(ev) { 266 clearTimeout($this.data('scrollTimeout')); 267 $this.data('scrollTimeout', setTimeout(callback.bind(that), 600, ev)); 268 }); 269}; 270 271$(window).scrollStopped(function(ev){ 272 $('header').removeClass('nav-up') 273 $('#quick').removeClass('quick-down'); 274 $('#mypage aside').removeClass('head-up'); 275 $('.detail_control .list_btn, .list_control .list_btn').removeClass('list_btn_up'); 276 if ($(window).width() <= 800) { 277 $('#selectWrap, .detail_control .right, .share_control').fadeIn(400); 278 if ($(document).scrollTop() < 100) { 279 $('#selectWrap, .detail_control .right, .share_control').css({ 280 bottom: '10rem' 281 }); 282 $("footer .ft_top").fadeOut(400); 283 } else { 284 $('#selectWrap, .detail_control .right, .share_control').css({ 285 bottom: '16rem' 286 }); 287 $("footer .ft_top").fadeIn(400); 288 }; 289 } 290}); 291 292 293var growmouseover = [true, '25px'] // magnify progress bar onmouseover? [Boolean, newheight] 294
295///////// No need to edit beyond here ///////// 296 297var $indicatorparts = $(document.body).append('<div class="scrollindicator"><div class="scrollprogress"></div></div>') 298var $indicatorMain = $indicatorparts.find('div.scrollindicator') 299var $scrollProgress = $indicatorparts.find('div.scrollprogress') 300var indicatorHeight = $indicatorMain.outerHeight() 301var transformsupport = $scrollProgress.css('transform') 302transformsupport = (transformsupport == "none" || transformsupport == "") ? false : true 303 304function syncscrollprogress() { 305 var winheight = $(window).height() 306 var docheight = $(document).height() 307 var scrollTop = $(window).scrollTop() 308 var trackLength = docheight - winheight 309 var pctScrolled = Math.floor(scrollTop / trackLength * 100) // gets percentage scrolled (ie: 80 NaN if tracklength == 0) 310 $scrollProgress.css('transform', 'translate3d(' + (-100 + pctScrolled) + '%,0,0)') 311} 312 313if (transformsupport) { 314 $indicatorMain.css('visibility', 'visible') 315 316 $indicatorMain.on('click', function (e) { 317 var trackLength = $(document).height() - $(window).height() 318 var scrollamt = e.clientX / ($(window).width() - 32) * trackLength 319 $('html,body').animate({ scrollTop: scrollamt }, 'fast') 320 }) 321 322 // if (growmouseover[0]) { 323 // $indicatorMain.on('mouseenter touchstart', function (e) { 324 // $(this).css('height', growmouseover[1]) 325 // e.stopPropagation() 326 // }) 327 328 // $indicatorMain.on('mouseleave', function (e) { 329 // $(this).css('height', indicatorHeight) 330 // }) 331 332 // $(document).on('touchstart', function (e) { 333 // $indicatorMain.css('height', indicatorHeight) 334 // }) 335 // } 336 337 $(window).on("scroll load", function () { 338 requestAnimationFrame(syncscrollprogress) 339 }) 340}; 341
342function innerHeightEvt(){ 343 var h = document.querySelector('html').offsetHeight; 344 if(isMobile){ 345 if(isKakako && ((agent.search("iphone") > -1) || (agent.search("ipod") > -1) || (agent.search("ipad") > -1))){ 346 h = document.querySelector('html').offsetHeight + kakakUrlgap; 347 }else if(isKakako){ 348 h = document.querySelector('html').offsetHeight + ((screen.height - document.querySelector('html').offsetHeight) / 2); 349 } 350 } 351 return h; 352}; 353var innerHeight = innerHeightEvt(); 354 355// $(document).on('click', '#selectWrap button', function () { 356// $(this).siblings(".option").toggle(); 357// if($(window).width() <= 800){ 358// $(".allMenu_bg").toggle(); 359// $("body").toggleClass("hidden"); 360// } 361// }); 362
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.