1/*------------------------------------------------- 2title : ê³µíµ 3Author : PLAN I 4Create date : 2023-01-01 5-------------------------------------------------*/ 6 7$(function() 8{ 9 /*------------------------------------------------- ë ì´ì´íì -------------------------------------------------*/ 10 11 // ë«ê¸° 12 $('[id*="layerPopup"]').find('.close a').on('click', function() 13 { 14 $(this).parents('[id*="layerPopup"]').hide(); 15 16 return false; 17 }); 18 19 // íì ìì í¤ë³´ëê° ëê°ì ë íì ë«ì(ì ê·¼ì±) 20 $('[id*="layerPopup"]').find('*:last').keydown(function(e) 21 { 22 if(e.keyCode === 9) 23 { 24 $(this).parents('[id*="layerPopup"]').hide(); 25 } 26 }); 27 28 /*------------------------------------------------- //ë ì´ì´íì -------------------------------------------------*/ 29 30 // 모ë¬íì , ìµìë¨ë°°ë ì´ê¸° ë«ê¸° ë²í¼ í´ë¦ ì 31 $('#issue, .topbanner').find('a.control').on('click', function() 32 { 33 // ì´ê¸° ëë ì ë 34 if ( $(this).hasClass('open') == true ) 35 { 36 // ì ì´ë ¤ìì ë 37 if ( $(this).parents('#issue, .topbanner').hasClass('active') == false ) 38 { 39 $(this).parents('#issue, .topbanner').addClass('active'); 40 $(this).find('.sr_only').text('ë«ê¸°'); 41 42 // 모ë¬íì ì¼ ë 43 if ( $(this).parents('#issue').length == 1 ) 44 { 45 modalpopup.slideTo(0); 46 modalpopup.autoplay.start(); 47 48 swiperdisable('#issue'); 49 } 50 else 51 { 52 topbanner.slideTo(2); 53 topbanner.autoplay.start(); 54 } 55 } 56 // ì´ë ¤ìì ë 57 else 58 { 59 $(this).parents('#issue, .topbanner').removeClass('active'); 60 $(this).find('.sr_only').text('ì´ê¸°'); 61 62 // 모ë¬íì ì¼ ë 63 if ( $(this).parents('#issue').length == 1 ) 64 { 65 modalpopup.autoplay.stop(); 66 modalpopup.slideTo(0); 67 68 $('#issue').removeClass('type1'); 69 } 70 else 71 { 72 topbanner.autoplay.stop(); 73 74 setTimeout(function() 75 { 76 topbanner.slideTo(2); 77 78 }, 200); 79 } 80 } 81 } 82 else 83 { 84 $(this).parents('#issue, .topbanner').removeClass('active'); 85 $('#issue').removeClass('type1'); 86 $(this).parents('#issue, .topbanner').find('.open').find('.sr_only').text('ì´ê¸°'); 87 88 // 모ë¬íì ì¼ ë 89 if ( $(this).parents('#issue').length == 1 ) 90 { 91 modalpopup.autoplay.stop(); 92 modalpopup.slideTo(0); 93 } 94 else 95 { 96 topbanner.autoplay.stop(); 97 98 setTimeout(function() 99 { 100 topbanner.slideTo(2); 101 102 }, 200); 103 } 104 } 105 106 return false; 107 }); 108 109 // 컨í¸ë¡¤ë¬ ì¶ê° 110 $('#issue, .topbanner').find('.list').after('<div class="control"><button class="prev">ì´ì </button><button class="next">ë¤ì</button><button class="play">ì¬ì</button><button class="pause active">ì ì§</button><div class="pager"></div></div>'); 111 112 /*------------------------------------------------- 모ë¬íì -------------------------------------------------*/ 113 114 // ì¤ìì´í¼ 115 var modalpopup = new Swiper("#issue .group", 116 { 117 autoplay : 118 { 119 delay : 2500, 120 disableOnInteraction: false, 121 }, 122 wrapperClass : "list", 123 slideClass : "list > li", 124 slidesPerView : 1, 125 spaceBetween : 10, 126 loop : false, 127 navigation : 128 { 129 nextEl : "#issue .next", 130 prevEl : "#issue .prev", 131 }, 132 pagination : 133 { 134 el : "#issue .pager", 135 clickable : true, 136 }, 137 breakpoints : 138 { 139 769 : 140 { 141 slidesPerView : 3, 142 spaceBetween : 30, 143 }, 144 581 : 145 { 146 slidesPerView : 2, 147 spaceBetween : 20, 148 } 149 } 150 });
151 152 // ì¤ìì´í¼ ìµì 153 swiperoption('#issue', modalpopup, '.open strong.count, .label .count'); 154 155 // 모ë¬íì ìì í¤ë³´ëê° ëê°ì ë íì ë«ì(í ìì-ì ê·¼ì±) 156 $('#issue').find('a:last').keydown(function(e) 157 { 158 if ( $(this).parents('#issue').hasClass('active') == true ) 159 { 160 if(e.keyCode === 9) 161 { 162 $(this).parents('#issue').removeClass('active'); 163 } 164 } 165 }); 166 167 // 모ë¬íì ìì í¤ë³´ëê° ëê°ì ë íì ë«ì(ìí ìì-ì ê·¼ì±) 168 $('#issue').find('a:first').keydown(function(e) 169 { 170 if(e.keyCode === 9 && e.shiftKey) 171 { 172 if ( $(this).parents('#issue').hasClass('active') == true ) 173 { 174 $(this).parents('#issue').removeClass('active'); 175 } 176 } 177 }); 178 179 /*------------------------------------------------- //모ë¬íì -------------------------------------------------*/ 180 181 /*------------------------------------------------- ìµìë¨ë°°ë -------------------------------------------------*/ 182 183 var topbanner = new Swiper(".topbanner .group", 184 { 185 autoplay : 186 { 187 delay : 4000, 188 disableOnInteraction: false, 189 }, 190 wrapperClass : "list", 191 slideClass : "list > li", 192 direction : "vertical", 193 loop : this.SwiperLength > 1, 194 navigation : 195 { 196 nextEl : ".topbanner .next", 197 prevEl : ".topbanner .prev", 198 }, 199 pagination : 200 { 201 el : ".topbanner .pager", 202 clickable : true, 203 }, 204 }); 205 206 // ì¬ë¼ì´ë íê° ì´íì¼ ê²½ì° ì»¨í¸ë¡¤ ë²í¼ ê°ì¶ê¸° 207 if($(".topbanner .list > li").length <= 1){ 208 $(".topbanner .control:not(.close)").hide(); 209 } 210 211 swiperoption('.topbanner', topbanner, '.open strong.count'); 212 213 /*------------------------------------------------- //ìµìë¨ë°°ë -------------------------------------------------*/ 214}); 215 216// ì¤ìì´í¼ ê´ë ¨ 217function swiperoption(target, swiper, count) { 218 // ëª©ë¡ ì 219 $(target).find(count).text($(target).find('.list li').length - $(target).find('.list .swiper-slide-duplicate').length); 220 221 // ì´ê¸° ë²í¼ì ë§í¬í ì¤í¸ ì¶ê° 222 if ($(target).hasClass('active') == true) { 223 $(target).find('.open').append('<span class="sr_only">ë«ê¸°</span>'); 224 } 225 else { 226 $(target).find('.open').append('<span class="sr_only">ì´ê¸°</span>'); 227 } 228 229 // 모ë¬íì , ìµìë¨ë°°ë ì¬ì/ì ì§ 230 $(target).find('.play, .pause').on('click', function () { 231 if ($(this).hasClass('play') == true) { 232 swiperplay(); 233 } 234 else { 235 swiperpause(); 236 } 237 }); 238 239 // ì¤ìì´í¼ ìì ì´ì ìì ë ìëì¬ì ì ì§(ì ê·¼ì±) 240 $(target).find('.list *').on 241 ({ 242 focusin: function () { 243 swiperpause() 244 }, 245 // mouseover: function () { 246 // swiperpause(); 247 // }, 248 focusout: function () { 249 swiperplay(); 250 }, 251 // mouseleave: function () { 252 // swiperplay(); 253 // }, 254 }); 255 256 // ì ì§ 257 function swiperpause() { 258 swiper.autoplay.stop(); 259 260 $(target).find('.control button').removeClass('active'); 261 $(target).find('.play').addClass('active'); 262 } 263 264 // ì¬ì 265 function swiperplay() { 266 swiper.autoplay.start(); 267 268 $(target).find('.control button').removeClass('active'); 269 $(target).find('.pause').addClass('active'); 270 } 271 272 // ë²í¼ ë¹íì±í ë ë ì¬ë¼ì´ëì í´ëì¤ ì¶ê° 273 $(window).on('load resize', function () { 274 swiperdisable(target); 275 });
276} 277 278// ì¤ìì´í¼ ì¬ë¼ì´ë ì ë ë í´ëì¤ ì¶ê° 279function swiperdisable(target) { 280 setTimeout(function () { 281 if ($(target).find('.prev, next').hasClass('swiper-button-lock') == true) { 282 $(target).addClass('type1'); 283 } 284 else { 285 $(target).removeClass('type1'); 286 } 287 288 }, 100); 289}
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.