1(function($) { 2 'use strict'; 3 $(function() { 4 5/*============================================= 6 global 7=============================================*/ 8 var $body = $('body'), 9 mode = 'pc', 10 view = 'pc', 11 animSpd = 300; 12 13/*============================================= 14 mode / view 15=============================================*/ 16 // mode 17 if($body.hasClass('spMode')){ 18 mode = 'sp'; 19 } else if($body.hasClass('tbMode')){ 20 mode = 'sp'; 21 } 22 if(mode === 'sp'){ 23 } else {} 24 25 // view 26 if($body.hasClass('spView')){ 27 view = 'sp'; 28 } 29 if(view === 'sp'){ 30 $('#gNav .tokenMenu .toggleSwitch').append('<span></span>'); 31 burgerMotion(); 32 scrollTableMotion(); 33 toTopSpMotion(); 34 topicsSliderSpMotion(); 35/*============================================= 36 spTel 37=============================================*/ 38 $body.spTel({ 39 target: '.spTel' 40 }); 41 } else { 42 searchMotion(); 43 fontsizeChangeMotion(); 44 megaMenuMotion(); 45 toTopPcMotion(); 46 topicsSliderPcMotion(); 47 } 48 49/*============================================= 50 global function 51=============================================*/ 52 initialize(); 53 headerFixMotion(); 54 accordionMotion(); 55 56/*============================================= 57 burgerMenu 58=============================================*/ 59 function burgerMotion(){ 60 $('#header .headTop .right').burgerMenu({ 61 toggleSetPosi: '#header', 62 toggleHTML: '<p><span></span></p>', 63 toggleClass: 'active', 64 close: false, 65 closeSetPosi: '#header .headTop .right', 66 closeHTML: '<p><span>close</span></p>', 67 overlay: false, 68 overlaySetPosi: '#header', 69 navInit: false, 70 speed: animSpd, 71 moveType: 'default' 72 }); 73 } 74 75/*============================================= 76 scroll table 77=============================================*/ 78 function scrollTableMotion(){ 79 if ($('.scrollTable')[0]) { 80 $('.scrollTable').each(function() { 81 var $this = $(this); 82 if(!$this.closest('.scroll')[0]){ 83 $($this).wrap('<div class="scroll"></div>'); 84 } 85 if ($this.find('tr').innerWidth() > window.innerWidth) { 86 $('.scroll').removeClass('active'); 87 } 88 }); 89 } 90 } 91 92/*============================================= 93 searchMotion 94=============================================*/ 95 function searchMotion(){ 96 $('#searchWrap .searchItem').burgerMenu({ 97 toggleSetPosi: '#searchWrap', 98 overlay: false, 99 overlaySetPosi: '#skin', 100 speed: animSpd, 101 linkClass: 'search' 102 }); 103 } 104 105/*============================================= 106 fontSizeControl 107=============================================*/ 108 function fontsizeChangeMotion(){ 109 if($('#fontSizer')[0]){ 110 $('#fontSizer').fontsizeChange({ 111 defaultSize: 0, 112 target: 'body', 113 activeClass: 'active', 114 defaultClass: 'defaultFont', 115 cookieExpires: 30, 116 onAfter: function() {} 117 }); 118 } 119 } 120 121/*============================================= 122 megaMenu 123=============================================*/ 124 function megaMenuMotion(){ 125 $('#gNav .tokenMenu > ul > li').megaMenu({ 126 mode : view, 127 triggerMode : 'hover', 128 pullDown : false, 129 item : '.megaItemWrap > *', 130 overlayPosi : '#skin', 131 closeBtn : true, 132 closeTag : '<p><span>close</span></p>', 133 speed : animSpd, 134 delay : 0, 135 loadDelay : 0, 136 scrollHide : false, 137 existJudg : false 138 }); 139 } 140 141/*============================================= 142 headFix 143=============================================*/ 144 function headerFixMotion(){ 145 $('#header').headFix({ 146 mode : view, 147 headerMargin : true, 148 targetMargin : '#header + *', 149 cssMargin : 'padding-top', 150 fixMode : 'default', 151 headScrollX : '.headTop, .headBottom' 152 }); 153 } 154 155/*============================================= 156 Accordion 157=============================================*/ 158 function accordionMotion(){ 159 if($('.acc-title')[0]){ 160 $('.acc-title').infoAccordion({ 161 triggerMode: 'click', 162 item: '.acc-item', 163 openSpeed: animSpd, 164 delaySpeed: 0, 165 allOpenBtn: '.allOpenBtn', 166 allCloseBtn: '.allCloseBtn', 167 interlocking: false, 168 parentClass: '.acc-Wrap' 169 }); 170 } 171 } 172 173/*============================================= 174 toTop 175=============================================*/ 176 function toTopSpMotion(){ 177 $('.pagetop').toTop({ 178 showStart: 100, 179 showStyle: {'position': 'fixed'}, 180 fix: true, 181 fixPosi: '#footer', 182 addNum: 0, 183 fixStyle: {'position': 'absolute'} 184 }); 185 } 186 function toTopPcMotion(){ 187 $('.pagetop').toTop({ 188 showStart: 100, 189 showStyle: {'position': 'fixed'}, 190 fix: true, 191 fixPosi: '#footer', 192 addNum: -70, 193 fixStyle: {'position': 'absolute'} 194 }); 195 } 196 197/*============================================= 198 topicsSlider 199=============================================*/
200 function topicsSliderSpMotion(){ 201 if($('.topicsSlider')[0]){ 202 $('.topicsSlider').slick({ 203 autoplay: true, 204 autoplaySpeed: 4000, 205 slidesToShow: 1, 206 lidesToScroll: 1 207 }); 208 } 209 } 210 function topicsSliderPcMotion(){ 211 if($('.topicsSlider')[0]){ 212 $('.topicsSlider').slick({ 213 autoplay: true, 214 autoplaySpeed: 4000, 215 slidesToShow: 4, 216 lidesToScroll: 1 217 }); 218 } 219 } 220 if($('.topicsSlider')[0]){ 221 $('.topicsSlider.slick-slider .slick-track .slick-slide').matchHeight(); 222 } 223 224/*============================================= 225 matchHeight 226=============================================*/ 227 if($('.matchHeight')[0]){ 228 $('.matchHeight > *').matchHeight(); 229 } 230 $('.cateTopItem .ttl').matchHeight(); 231 232/*============================================= 233 SmoothScroll 234=============================================*/ 235 $('a[href*="#"]:not([href="#"]):not(.noSmooth):not([href*="TabModule"])').smoothScroll({ 236 speed: animSpd, 237 fix: true, 238 fixItem: '#header' 239 }); 240 241/*============================================= 242 pluginExists 243=============================================*/ 244 function pluginExists(pluginName) { 245 return $.fn[pluginName] ? true : false; 246 } 247 248/*============================================= 249 Initialize 250=============================================*/ 251 function initialize(){ 252 $('a[href="#"]').on('click', function(e){ 253 e.preventDefault(); 254 }); 255 } 256 }); 257})(jQuery);
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.