1/** 2 * @File Name : script_scroll1section1.js 3 * @Description : jQuery Code. ì¤í¬ë¡¤ ì¹ì . 4 * @Modification Information 5 * <pre> 6 * ìì ì¼ | ìì ì | ìì ë´ì© 7 * 2016.11.03 | 문ìì | ìµì´ ë±ë¡ 8 * 2016.11.30 | 문ìì | ì구ë°ì. ê²°í¨ê°ì . ê³ ëí. 9 * 2017.03.24 | 문ìì | íì¼ëª ë³ê²½. jq_scroll1section1.js 를 script_scroll1section1.js ë¡ 10 * 2018.03.26 | 문ìì | ì½í ì¸ ë§ì¶¤ setoff ì ì© 11 * 2018.07.12 | 문ìì | $nav1top1 ë³ê²½, $nav1top2 ì¶ê° 12 * 2020.01.30 | 문ìì | //setoff = -$head.height(); 13 * 2020.02.05 | 문ìì | ì¤í¬ë¡¤. í´ë¹ ìì¹ë¡ ê°ë©´ addClass 14 * </pre> 15 * @author ì¹íì¤íì¤ ë¬¸ìì 16 * @since 2016.10.26 17 * 18 * @Copyright (C) IACTS.CO.KR All rights reserved. 19 */ 20 21/* Table of contents )) â ì½ë ë³íë©´ 목차 ê°±ì íì¸ì. 22************************************************************ 23Var -- 24 ë³ì ì´ê¸°í 25Event -- 26 ë§ì°ì¤í 27ë©ì¸UXì°ê²° 28 $ì íê°ì²´ 29 ëìì°ê²° 30Function -- 31 smoothScrollToHash() // ì¹ì ë´ë¹.ëì 32 smoothScrollTop() // ë¶ëë¬ì´ ì¸ë¡ ì¤í¬ë¡¤ 33ì¦ìì¤í -- 34 35************************************************************ 36 */ 37 38/** ââââââ (function(){})(); 20161024. 20161130. MoonYoungshin 39 */ 40//(function(){ // 20161130. ì¦ì ì¤í ìµëª í¨ì ì¬ì©ë§ì! ì¬ê¸° í¨ìë¤ì ì ìì¼ë¡ ì¬ì©í기 ìí´ì! 41 42 var setoff = 0, // ììê° ìµì¢ ìê³ 43 do1 = {}; // ëìì ì 44 45 46 /** ââ ë§ì°ì¤í . 20160721. MoonYoungshin 47 */ 48 $(function(){ 49 $("html, body").on('mousewheel DOMMouseScroll', function(e) { 50 var e = e.originalEvent, 51 delta = 0; 52 //console.log(e); 53 if (e.detail) { // [FF] 54 delta = e.detail * -28; // [CR][IE]ê³¼ ëì¼íê² ê³ì 55 //console.log('detail: '+ delta); 56 }else{ // [CR][IE] 57 delta = e.wheelDelta; 58 //console.log('wheelDelta: '+ delta); 59 } 60 }); 61 }); 62 63 64 65 /* ââ Call Functions, Plugins ââââââ */ 66 67 $(function(){ // 20161024~. 20180712 68 69 var nowScrollTop = 0; // $(window).scrollTop() ë´ëê±° 70 71 var $nav1a = $('.mousewheel1[class*="scroll1"]'), // íì¬ íì´ì§ ì¹ì ì¼ë¡ ê°ê¸° 72 $nav1top1 = $('#gotop1'), // íì¬ íì´ì§ ìë¨ì¼ë¡ ê°ê¸° 73 $nav1top2 = $('#gotop2'), // íì¬ íì´ì§ ìë¨ì¼ë¡ 74 $nav1bottom1 = $('#gobottom1'), // íì¬ íì´ì§ ìë¨ì¼ë¡ ê°ê¸° 75 $head = $('#head'); // ìë¨ fixed ìì 76 77 // 20200130 78 //setoff = -$head.height(); 79 80 81 /** ââ ì´ë²¤í¸ì°ê²°. 20180712. MoonYoungshin 82 */ 83 $nav1a.each(function(index, element){ 84 // element == this 85 $(this).on('click', function(e){ 86 e.preventDefault(); 87 smoothScrollToHash($(this), setoff); 88 }); 89 }); 90 91 $nav1top1.on('click', function(e){ // 맨 ìë¡ ê°ê¸° 92 e.preventDefault(); 93 smoothScrollTop(0); 94 }); 95 96 $nav1top2.on('click', function(e){ // 맨 ìë¡ ê°ê¸° 97 e.preventDefault(); 98 smoothScrollTop(0); 99 }); 100 101 $nav1bottom1.each(function(index, element){ 102 // element == this 103 $(this).on('click', function(e){ 104 e.preventDefault(); 105 smoothScrollToHash($(this), setoff); 106 }); 107 }); 108 109 110 /** ââ ì¤í¬ë¡¤. í´ë¹ ìì¹ë¡ ê°ë©´ addClass. 20200205. MoonYoungshin 111 */ 112 (function(){ 113 114 $(window).on('scroll load resize', function(e){ 115 nowScrollTop = $(window).scrollTop(); 116 //$test.html(nowScrollTop); 117 if( nowScrollTop > $head.height() ){ 118 $head.addClass('scroll-top-gt-this'); // í¤ë íì ë³´ì´ê² 119 $nav1top1.addClass("on"); 120 $nav1bottom1.addClass("on"); 121 }else{ 122 $head.removeClass('scroll-top-gt-this'); 123 $nav1top1.removeClass("on"); 124 $nav1bottom1.removeClass("on"); 125 } 126 }); 127 128 })();
129 130 131 }); 132 133 134 /* ââ Function ââââââ */ 135 136 137 /** ââ ì¹ì ë´ë¹.ëì. 20160725. MoonYoungshin 138 */ 139 function smoothScrollToHash($this, setoff){ // (ì ì´ì¿¼ë¦¬ê°ì²´, ììê°) 140 this_hash = $this[0].hash; // = $this.attr('href'); 141 //console.log(this_hash); 142 this_hash_top = $(this_hash).offset().top; 143 smoothScrollTop( this_hash_top, setoff ); // setoff ë¨ì ìì´ ì ì«ê° 144 } 145 146 147 /** ââ ë¶ëë¬ì´ ì¸ë¡ ì¤í¬ë¡¤. 20160725. MoonYoungshin 148 */ 149 function smoothScrollTop(end_top, setoff){ // (ì´ëí ê³³, ììê°) 150 (setoff)? setoff: setoff = 0; 151 $('html, body').stop().animate({ // $('html, body').animate() â[í¸í]OK! 152 //scrollTop: end_top // end_top ì´ëì ì¬ê¸°ì íê³ .. ëëë©´ ììê° ì´ë ììíë ¤ëê±° 153 scrollTop: end_top + setoff // ìì í©ì¹¨ 154 }, 400, 'swing', function(){ 155 // ìëì²ë¼ 2ë² ëìíë ê±°ë ì´ì§ë¬ì 주ìì²ë¦¬íê³ ììê° í©ì³ì 1ë²ì ëììí´. 156 //$('html, body').stop().animate({ 157 // scrollTop: $(document).scrollTop() + setoff 158 //}, 200, 'swing', function(){}); 159 }); 160 } 161 162 163//})(); 164/** /ââââââ (function(){})(); */
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.