1// import { TweenLite, TimelineMax, TweenMax } from "gsap"; 2// declare module "gsap"{ 3// export interface TweenConfig{ 4// [p:string]: any; 5// } 6// } 7// JavaScript Document 8/** 9 * 使ç¨javascriptã©ã¤ãã©ãª 10 * Modernizr 11 * TweenMax 12 * Swiper 13 */ 14let img = document.getElementsByTagName('img'); 15let imgNum = img.length; 16// SVGããã¡ãªãã©ã¦ã¶ã¯<img>ã¿ã°ã®SVGãã¡ã¤ã«ã¯pngã«å¤æ 17function svgTopng() { 18 //console.log(img) 19 if (!Modernizr.svg) { 20 for (var i = 0; i < imgNum; i++) { 21 var src = img[i].getAttribute('src'), reSrc = src.replace(/\.svg/gi, '.png'); 22 img[i].setAttribute('src', reSrc); 23 } 24 } 25 return; 26} 27; 28// 夿°ãªã¹ã 29const mainBlock = document.getElementById('main'), pagetitle = document.getElementById('title'); 30// ããããä¸ã¯èªã¿è¾¼ã¿ãå®äºãã¦ããå®è¡ããã 31window.onload = function () { 32 svgTopng(); 33 // TOPã®slider 34 // ã¹ã©ã¤ãå¯¾è±¡ã®æå® 35 var slidebox = document.getElementsByClassName('swiper-container')[0]; 36 // å®è¡å¦çå 容 37 function sliderfunc(slideelm) { 38 if (Modernizr.flexbox) { 39 var swiper = new Swiper(slidebox, { 40 speed: 1000, 41 spaceBetween: 0, 42 slidesPerView: 'auto', 43 autoHeight: true, 44 centeredSlides: true, 45 loop: true, 46 pagination:false,// { 47 //el: '.swiper-pagination', 48 // clickable: true, 49 //}, 50 navigation: { 51 nextEl: '.swiper-button-next', 52 prevEl: '.swiper-button-prev', 53 }, 54 autoplay: { 55 delay: 3000, 56 }, 57 breakpoints: { 58 980: { 59 slidesPerView: 1, 60 autoHeight: true, 61 } 62 } 63 }); 64 } 65 ; 66 } 67 ; 68 sliderfunc(slidebox); 69 70 // END:TOPã®slider 71 72 73 // æ±ç¨ã¬ã¤ã¢ã¦ãå ã®ãã¼ã¸ä¸é¨ã¸ã¹ã¯ãã¼ã«ãããã¿ã³ã®ã¢ã¯ã·ã§ã³ 74 if (mainBlock != null) { 75 let pagetopbox = mainBlock.getElementsByClassName('pagetop'); 76 if (pagetopbox.length !== 0) { 77 function commonsidepageTop(pagetopelm) { 78 if (0 < pagetopelm.length) { 79 var pagetopelm = pagetopelm, pagetopboxNum = pagetopelm.length, pagetopAtag = []; 80 for (var i = 0; i < pagetopboxNum; i++) { 81 pagetopelm[i].querySelector('a').addEventListener('click', function (event) { 82 event.preventDefault(); 83 TweenMax.to(window, 0.4, { scrollTo: 0 }); 84 }); 85 } 86 return pagetopelm; 87 } 88 } 89 ; 90 commonsidepageTop(pagetopbox); 91 } 92 } 93 // END:æ±ç¨ã¬ã¤ã¢ã¦ãå ã®ãã¼ã¸ä¸é¨ã¸ã¹ã¯ãã¼ã«ãããã¿ã³ã®ã¢ã¯ã·ã§ã³ 94 // ãªã³ã¯ãããã¯ã¹å ¨ä½ã«é©ç¨ãWCã§blankæå®ããã¦ããå ´åãè¨å®ãåæ 95 var linkboxtxt = document.querySelectorAll('.wlkb'); //æå®ã¯ã©ã¹å ã®aã¿ã°ã®ãªã³ã¯ãæå®ã¯ã©ã¹è¦ªè¦ç´ ã«å¯¾ãã¦ä»ä¸ 96 // ä¾ï¼li>p.wlkb>a[href="index.html"] ã¯liè¦ç´ å ¨ä½ãã¯ãªãã¯å¯è½ã¨ãªãã 97 function linkwrap(linkBoxWrapelm) { 98 if (linkBoxWrapelm.length != 0) { 99 let linkhref = [], boxNum = linkBoxWrapelm.length; 100 for (let i = 0; i < boxNum; i++) { 101 linkhref = linkBoxWrapelm[i].getElementsByTagName('a')[0]; 102 if (linkhref != null) { 103 let linkLi = linkhref.parentNode.parentNode, ahref = linkhref.getAttribute('href'); 104 linkLi.addEventListener('mouseover', function (event) { 105 this.classList.add('onhover'); 106 this.style.cursor = 'pointer'; 107 }); 108 linkLi.addEventListener('mouseout', function (event) { 109 this.classList.toggle('onhover'); 110 }); 111 linkLi.addEventListener('click', function (event) { 112 let linkclass = this.querySelector('a').getAttribute('class'), linkBlank = this.querySelector('a').getAttribute('target'); 113 ahref = this.querySelector('a').getAttribute('href'); 114 if (linkclass === 'wctr_blank' || linkBlank === '_blank') { 115 event.preventDefault(); 116 window.open(ahref); 117 } 118 else { 119 event.preventDefault(); 120 window.location.href = ahref; 121 } 122 }); 123 } 124 } 125 } 126 ; 127 return linkBoxWrapelm; 128 } 129 ; 130 linkwrap(linkboxtxt); 131 // ãããã«ãã´ãªé¨å 132 var linkboxtxt2 = document.getElementsByClassName('top-category'); 133 function linkwrap2(linkBoxWrapelm2) { 134 if (linkBoxWrapelm2.length != 0) { 135 let boxNum = linkBoxWrapelm2.length; 136 for (let i = 0; i < boxNum; i++) { 137 let liElm = linkboxtxt2[i].getElementsByTagName('li'); 138 for (let i = 0; i < liElm.length; i++) { 139 liElm[i].addEventListener('mouseover', function (ev) { 140 this.classList.add('onhover'); 141 }); 142 liElm[i].addEventListener('mouseout', function (ev) { 143 this.classList.toggle('onhover'); 144 }); 145 } 146 } 147 } 148 return linkBoxWrapelm2; 149 } 150 ; 151 linkwrap2(linkboxtxt2); 152 // close:window.onload = function() 153}; 154(function ($) { 155 $(function () { 156 // LightBox2ãScript function ç»åã¸ã®ãªã³ã¯ã対象 157 $('a[href$=".jpg"], a[href$=".jpeg"], a[href$=".gif"], a[href$=".png"]').each(function(index, elm){ 158 $(this).attr('data-lightbox', 'image'); 159 var imageTitle = $('img', this).attr('alt'); 160 $(this).attr('data-title', imageTitle).attr('title', imageTitle); 161 }); 162 // // LightBox Option 163 lightbox.option({ 164 alwaysShowNavOnTouchDevices: true, 165 fadeDuration: 200, 166 imageFadeDuration: 200 167 }); 168 // jQuery 169 /* ============================ */ 170/*toggle openbox*/ 171 172 $(".show_more dt,.md-bosyu h3").on("click", function() { 173 $(this).next().slideToggle(); 174 $(this).toggleClass("active"); 175 }); 176// ã¿ãã«å¯¾ãã¦ã¯ãªãã¯ã¤ãã³ããé©ç¨ 177 const tabs = document.getElementsByClassName('tab'); 178 for(let i = 0; i < tabs.length; i++) { 179 tabs[i].addEventListener('click', tabSwitch); 180 } 181
182 // ã¿ããã¯ãªãã¯ããã¨å®è¡ãã颿° 183 function tabSwitch(){ 184 // ã¿ãã®classã®å¤ã夿´ 185 document.getElementsByClassName('is-active')[0].classList.remove('is-active'); 186 this.classList.add('is-active'); 187 // ã³ã³ãã³ãã®classã®å¤ã夿´ 188 document.getElementsByClassName('is-show')[0].classList.remove('is-show'); 189 const arrayTabs = Array.prototype.slice.call(tabs); 190 const index = arrayTabs.indexOf(this); 191 document.getElementsByClassName('w-news')[index].classList.add('is-show'); 192 }; 193 194 //dwawerã¡ãã¥ã¼ 195 $('.drawer').drawer({ 196 iscroll: { 197 scrollX: false, 198 scrollY: true, 199 click: true, 200 mouseWheel: true, 201 disablePointer: true, 202 disableTouch: false, 203 disableMouse: false 204 }, 205 iscroll: { 206 // Configuring the iScroll 207 // https://github.com/cubiq/iscroll#configuring-the-iscroll 208 mouseWheel: true, 209 preventDefault: false 210 }, 211 }); 212 $('.drawer-dropdown li').on('click', function() { 213 $('.drawer').drawer('close'); 214 }); 215 216 217 var $win = $(window), 218 $spDn = $('.drawer-hamburger'); 219 220 221 $win.on('load resize', function() { 222 if ($spDn.is(':hidden')) { 223 $('.dropdown-toggle').click(function() { 224 var location = $(this).attr('href'); 225 window.location.href = location; 226 return false; 227 }); 228 } 229 }); 230 231 }); 232 233})(jQuery); 234function smartRollover() { 235 if(document.getElementsByTagName) { 236 var images = document.getElementsByTagName("img"); 237 for(var i=0; i < images.length; i++) { 238 if(images[i].getAttribute("src").match("_off.")) { 239 images[i].onmouseover = function() { 240 this.setAttribute("src", this.getAttribute("src").replace("_off.", "_on.")); 241 } 242 images[i].onmouseout = function() { 243 this.setAttribute("src", this.getAttribute("src").replace("_on.", "_off.")); 244 } 245 } 246 } 247 } 248} 249if(window.addEventListener) { 250 window.addEventListener("load", smartRollover, false); 251} 252else if(window.attachEvent) { 253 window.attachEvent("onload", smartRollover); 254} 255 256//# sourceMappingURL=script.js.map
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.