1/* ãããã¼ï¼ãããããã 2----------------------------------------------------------------------------- */ 3$(function(){ 4 $(".header-menu-nav-btn").on("click",function(){ 5 $(".header-menu-nav-drop").toggleClass("is-open"); 6 }); 7}); 8 9/* SPãã 10----------------------------------------------------------------------------- */ 11 12$(function(){ 13 14 /* ãµã¤ãã¡ãã¥ã¼ */ 15 $(".side-btn button").on("click",function(){ 16 $(".side").toggleClass("is-open"); 17 }); 18 19}); 20 21/* ã¿ãåãæ¿ã 22----------------------------------------------------------------------------- */ 23$(function() { 24 if($(".tab").length){ 25 $(".tab-btn li").on("click",function(){ 26 var index = $('.tab-btn li').index(this); 27 $(".tab-main .tab-main-box").hide(); 28 $(".tab-main .tab-main-box").eq(index).fadeIn(); 29 $(".tab-btn li").removeClass("is-current"); 30 $(this).addClass("is-current"); 31 }); 32 }; 33}); 34 35/* ããªãã¼ããã§ã㯠36----------------------------------------------------------------------------- */ 37$(function($) { 38 $("form").validationEngine({ 39 focusFirstField: true, 40 scroll: true 41 }); 42}); 43 44/* ã¢ã¼ãã«ã¦ã£ã³ã㦠45----------------------------------------------------------------------------- */ 46$(function(){ 47 if($(".modal").length){ 48 49 /* 鏿ä¸ã®ããã¹ãæ½åº */ 50 $(".main .modal-open").each(function(){ 51 var modal_id = $(this).attr("id"); 52 chkSelected(modal_id); 53 }); 54 55 /* ã¢ã¼ãã«ãéã */ 56 $(".modal-open").on("click",function(){ 57 var id = $(this).attr("id"); 58 var tgt = "#tgt-" + id; 59 $(tgt).fadeIn(); 60 61 // 鏿ããé ç®ã®è¡¨ç¤º 62 $(".modal-window").find("input[type='radio'],input[type='checkbox']").on("change",function(){ 63 chkSelected(id); 64 }); 65 }); 66 67 /* ã¢ã¼ãã«ãéãã */ 68 $(".modal-close").on("click",function(){ 69 $(this).parents(".modal").fadeOut(); 70 }) 71 } 72 73 // é ç®ãã§ã㯠74 function chkSelected(id){ 75 76 var window = "#tgt-" + id + " .modal-window"; 77 78 if($(window).find("table").length){ 79 // ãã¼ãã«å½¢å¼ï¼tableï¼ã®å ´å 80 var tgt = $(window).find("table tr"); 81 82 }else if($(window).find("ul").length){ 83 // ãªã¹ãå½¢å¼ï¼ulï¼ã®å ´å 84 var tgt = $(window).find("ul li"); 85 } 86 87 var result = "#res-" + id; 88 var resTxt = ""; 89 90 // 鏿ä¸é ç®ã®åå¾ 91 $(tgt).each(function(){ 92 var result = ""; 93 var input = $(this).find("input[type='radio'],input[type='checkbox']"); 94 var txt = $(this).find("label").text(); 95 96 if($(input).prop("checked") === true){ 97 resTxt = resTxt + txt + " / "; 98 } 99 }); 100 101 // 表示ããã¹ãå½¢æ 102 if(resTxt === ""){ 103 resTxt = "æªé¸æ"; 104 }else{ 105 resTxt = resTxt.slice(0,-2); 106 } 107 108 // 対象ã¨ãªã¢ã«ããã¹ã表示 109 $(result).text(resTxt); 110 }; 111 112}); 113 114/* ãã¤ã¢ãã° 115----------------------------------------------------------------------------- */ 116$(function(){ 117 $(document).on("click", ".dialog-close", function(){ 118 $(this).parents(".dialog").fadeOut(); 119 }) 120}); 121 122/* åºåã¹ã©ã¤ãã¼ 123----------------------------------------------------------------------------- */ 124$(function(){ 125 if($(".ad-slider").length){ 126 $('.ad-slider ul').slick({ 127 arrows:true, 128 dots:false, 129 autoplay:true, 130 autoplaySpeed:8000, 131 slidesToShow:5, 132 slidesToScroll:5, 133 prevArrow:'<button type="button" class="btn-prev"><i class="fas fa-chevron-left"></i></button>', 134 nextArrow:'<button type="button" class="btn-next"><i class="fas fa-chevron-right"></i></button>', 135 responsive: [{ 136 breakpoint: 769, 137 settings: { 138 slidesToShow:3, 139 slidesToScroll:3, 140 } 141 }] 142 }); 143 } 144}); 145 146/* æ±ç¨ã¢ã³ã¼ãã£ãªã³ 147----------------------------------------------------------------------------- */ 148$(function(){ 149 if($(".accordion").length){ 150 $(".accordion-btn").on("click",function(){ 151 $(this).parents(".accordion").find(".accordion-tgt").slideToggle(); 152 }); 153 }; 154}); 155 156/* ã¹ã ã¼ã¹ã¹ã¯ãã¼ã« 157----------------------------------------------------------------------------- */ 158$(function(){ 159 $('a[href^="#"]').click(function(){ 160 var speed = 500; 161 var href= $(this).attr("href"); 162 var target = $(href == "#" || href == "" ? 'html' : href); 163 var position = target.offset().top; 164 $("html, body").animate({scrollTop:position}, speed, "swing"); 165 return false;
166 }); 167}); 168 169/* ãã¼ã¸ãã¼ã·ã§ã³ 170----------------------------------------------------------------------------- */ 171 172$(function(){ 173 if($("#paging").length){ 174 175 $(".paged-content").hide(); 176 $(".paged-content:first-child").show(); 177 $("#paging").pagination({ 178 items: 5, 179 //displayedPages: 1, 180 cssStyle: 'light-theme', 181 prevText: '', 182 nextText: '', 183 onPageClick: function(pageNumber){show(pageNumber)} 184 }); 185 rankingPager(); 186 } 187}); 188 189function show(pageNumber){ 190 var page="#page-"+pageNumber; 191 $('.paged-content').hide() 192 $(page).show(); 193 rankingPager(); 194}; 195 196function rankingPager(){ 197 if($(".ranking-main-num").length){ 198 $(".ranking-main-num ul li:nth-child(1)").find("a,span").text("1ã20ä½"); 199 $(".ranking-main-num ul li:nth-child(2)").find("a,span").text("21ã40ä½"); 200 $(".ranking-main-num ul li:nth-child(3)").find("a,span").text("41ã60ä½"); 201 $(".ranking-main-num ul li:nth-child(4)").find("a,span").text("61ã80ä½"); 202 $(".ranking-main-num ul li:nth-child(5)").find("a,span").text("81ã100ä½"); 203 }; 204}; 205 206/* ã¬ãã¥ã¼æç¨¿ç¨ãã¼ã 207----------------------------------------------------------------------------- */ 208$(function(){ 209 210 if($(".review").length){ 211 212 /* åæå¤ãã§ã㯠*/ 213 var val = 0; 214 $(".review").each(function(){ 215 val = $(this).find("input[type='radio']:checked").val(); 216 }); 217 reviewCheck(val); 218 219 /* ããã¼æ */ 220 $(".review label").hover( 221 function(){ 222 val = $(this).find("input[type=radio]").val(); 223 reviewCheck(val); 224 }, 225 function(){ 226 val = $(this).parents(".review").find("input[type='radio']:checked").val(); 227 reviewCheck(val); 228 } 229 ); 230 }; 231 232 function reviewCheck(num){ 233 if(num !== 0){ 234 $(".review").each(function(){ 235 $("label").each(function(){ 236 var tgt = $(this).find("input").val(); 237 if(tgt <= num){ 238 $(this).addClass("is-on"); 239 }else{ 240 $(this).removeClass("is-on"); 241 } 242 }); 243 }); 244 } 245 } 246}); 247 248/* ã¨ãã£ã¿ 249----------------------------------------------------------------------------- */ 250$(function(){ 251 if($(".is-editor").length){ 252 $('.is-editor').trumbowyg({ 253 btns: [ 254 ['viewHTML'], 255 ['undo', 'redo'], 256 ['fontsize', 'foreColor', 'backColor'], 257 ['strong', 'em', 'del'], 258 ['superscript', 'subscript'], 259 ['link'], 260 ['justifyLeft', 'justifyCenter', 'justifyRight'], 261 ['horizontalRule'], 262 ['fullscreen'] 263 ], 264 plugins:{ 265 fontsize:{ 266// sizeList: [ 267// '極å°', 268// 'å°', 269// 'ä¸', 270// '大', 271// '極大' 272// ], 273 allowCustomSize: false 274 } 275 } 276 277 }); 278 } 279}); 280 281/* éµä¾¿çªå·èªåå ¥å 282----------------------------------------------------------------------------- */ 283$(function(){ 284 if($(".autozip").length){ 285 $('.autozip-btn').on('click', function(){ 286 AjaxZip3.zip2addr('zip','','pref','address'); 287 288 //æåæã«å®è¡ããå¦ç 289 AjaxZip3.onSuccess = function() { 290 $('.address').focus(); 291 }; 292 293 //失ææã«å®è¡ããå¦ç 294 AjaxZip3.onFailure = function() { 295 alert('éµä¾¿çªå·ã«è©²å½ãã使ãè¦ã¤ããã¾ãã'); 296 }; 297 298 return false; 299 }); 300 } 301}); 302 303 304/* ç»åã¢ãããã¼ãã¼ 305----------------------------------------------------------------------------- */ 306/* 307 * ãã¡ã¤ã«ã¢ãããã¼ãææä½ 308 * upload :1ãã¡ã¤ã«ãã¢ãããã¼ãããããã®ã¾ã¨ã¾ã
308 309 * upload-input-file :ãã¡ã¤ã«ãã¢ãããã¼ãããinputã¿ã° 310 * upload-input-file-btn :ãã¡ã¤ã«é¸æç»é¢ãéãçºã®ãã¿ã³ 311 * (input[type=file]ã¯è¡¨ç¤ºæåç·¨éä¸å¯ã®çºhideãã) 312 * upload-input-file-clear:ã¯ãªã¢ãã¿ã³ã®æ¼ä¸æ å ±ãä¿æ 313 * ãµã¼ãã¼ç»é²æ¸ãã¡ã¤ã«ã®ã³ãã¼,åé¤ã«ä½¿ç¨ 314 * upload-input-file-name :ãµã¼ãã¼ç»é²æ¸ã®ãã¡ã¤ã«å,鏿ããããã¡ã¤ã«åã表示 315 */ 316 317$(function(){ 318 319 var defaultMsg = '鏿ããã¦ãã¾ãã'; 320 321 // ãã¿ã³æ¼ä¸æãinput[type=file] ãéã 322 $(document).on('click','.upload-input-file-btn,.upload-preview',function(){ 323 $(this).parents(".upload").find('.upload-input-file').click(); 324 }); 325 326 // ã¢ãããã¼ãæ¸ã¿ãã¡ã¤ã«åæç» 327 $('.upload-input-file-name').each(function(){ 328 var fileName = $(this).data('fname'); 329 if (fileName){ 330 $(this).text(fileName); 331 } else{ 332 $(this).text(defaultMsg); 333 } 334 }); 335 336 // ãã¬ãã¥ã¼è¡¨ç¤º 337 $(document).on('change','.upload-input-file',function(e){ 338 var fileName = $(this).prop('files')[0].name; 339 $(this).siblings('.upload-input-file-name').text(fileName); 340 $(this).siblings('.upload-input-file-clear').val(false); 341 var fileImg = e.target.files[0], 342 reader = new FileReader(), 343 $preview = $(this).parents(".upload").find('.upload-preview'); 344 t = this; 345 if(fileImg.type.indexOf("image") < 0){ 346 return false; 347 } 348 reader.onload = (function(fileImg) { 349 return function(e) { 350 $preview.empty(); 351 $preview.append($('<img>').attr({ 352 src: e.target.result, 353 title: fileImg.name 354 })); 355 }; 356 })(fileImg); 357 reader.readAsDataURL(fileImg); 358 }); 359 // ãã¡ã¤ã«ãã¯ãªã¢ 360 $(".upload-clear").on('click',function() { 361 $(this).siblings('.upload-input-file').val(""); 362 $(this).siblings('.upload-input-file-name').text(defaultMsg); 363 $(this).siblings('.upload-input-file-clear').val(true); 364 $(this).parents(".upload").find('.upload-preview').empty(); // â 追å ï¼ãã¬ãã¥ã¼ç»åã®ã¯ãªã¢ï¼ 365 }); 366}); 367 368/* ãã©ãã¯ã¢ã³ãããããèæ¯è² 369----------------------------------------------------------------------------- */ 370$(function(){ 371 372 // ãã©ãã°ãã¦ããè¦ç´ ãé åã«ããã¨ã 373 $('.f-drop').on('dragenter dragover', function (event) { 374 event.stopPropagation(); 375 event.preventDefault(); 376 $(this).addClass("active"); 377 }); 378 379 // ãã©ãã°ãã¦ããè¦ç´ ãããããé åããå¤ããã¨ã 380 $('.f-drop').on('dragleave', function (event) { 381 event.stopPropagation(); 382 event.preventDefault(); 383 $(this).removeClass("active"); 384 }); 385 386}); 387 388/* 䏿¬ç»é²ï¼.submit-listï¼ 389----------------------------------------------------------------------------- */ 390$(function(){ 391 if($(".submit-list").length){ 392 393 var tgtForm = $(".submit-list").parents("form") 394 var tgtList = tgtForm.find("table"); 395 396 /* ãªã¹ãå inputãç·¨éãããã該å½è¡ã«ã¯ã©ã¹ .is-changed ã追å */ 397 $(tgtList).find("input,select").on("change",function(){ 398 $(this).parents("tr").addClass("is-changed"); 399 }); 400 401 /* submitæ */ 402 $(tgtForm).on("submit",function(){ 403 $(tgtList).find("tr").each(function(){ 404 if(!$(this).hasClass("is-changed")){ 405 $(this).remove(); 406 } 407 }); 408 }); 409 410 } 411}); 412 413/* 課éãªã¹ãï¼.payment-listï¼ 414----------------------------------------------------------------------------- */ 415$(function(){ 416 if($(".payment-list").length){ 417 418 419 420 $(".payment-list .btn-submit").on("click",function(){ 421 422 $(this).parents("tr").addClass("is-target"); 423 $(".payment-list tr").not(".is-target").remove(); 424 }); 425 426 427 } 428}); 429 430/* æ¤ç´¢ã¨ãªã¢éé 431----------------------------------------------------------------------------- */ 432$(function(){ 433 if($(".search-close").length){ 434 $(".search-close").on("click",function(){ 435 var tgt = $(this).parents(".admin-search,.shop-search"); 436 437 if($(tgt).hasClass("is-close")){ 438 $(tgt).removeClass("is-close"); 439 $(tgt).find("form").slideDown(); 440 }else{ 441 $(tgt).addClass("is-close"); 442 $(tgt).find("form").slideUp(); 443 } 444 }); 445 }; 446}); 447 448/* ç»é²å®äºãã¤ã¢ãã° 449----------------------------------------------------------------------------- */ 450/* ãµããããå¾ */ 451window.onload = function(){ 452 // ç»é²å¾ 453 if($("header").hasClass("submit")){ 454 msgDialog("ç»é²ãå®äºãã¾ããã"); 455 };
456 // åé¤å¾ 457 if($("header").hasClass("delete")){ 458 msgDialog("åé¤ãå®äºãã¾ããã"); 459 }; 460} 461 462/* ãã¤ã¢ãã°è¡¨ç¤ºé¢æ° */ 463function msgDialog(msg){ 464 addDialog(msg); // windowéã 465 setTimeout(closeDialog,2000); // ãã§ã¼ãã¢ã¦ã 466 setTimeout(afterDialog,2500); // Classåé¤ 467 468 // ã¯ãªãã¯ã§ãã¯ãã¼ãºå¯ã« 469 $(".popup").click(function(){ 470 closeDialog(); 471 setTimeout(afterDialog,500); 472 }); 473}; 474 475/* ãã¤ã¢ãã°è¡¨ç¤º */ 476function addDialog(msg){ 477 // ãã¤ã¢ãã°DOMçæ 478 $("body").prepend('<div class="popup"><p></p></div>'); 479 $(".popup p").text(msg); 480} 481 482/* ãã¤ã¢ãã°é表示 */ 483function closeDialog(){ 484 $(".popup").slideUp(); 485}; 486 487/* è¦ç´ ãåé¤ */ 488function afterDialog(){ 489 $(".popup").remove(); 490}; 491 492/* åé¤ç¢ºèª 493----------------------------------------------------------------------------- */ 494$(function(){ 495 $('button[name="btnDel"]').on("click",function(){ 496 if(!confirm('åé¤ãå®è¡ãã¾ããï¼ï¼ãã®æä½ã¯åãæ¶ãã¾ãããï¼')){ 497 /*ããã£ã³ã»ã«ã®æã®å¦ç */ 498 return false; 499 } 500 }); 501}); 502// ======================================================================= 503// ãã¼ã¸ã¸ã£ã³ã颿° 504// ======================================================================= 505/* [弿°] 506 * â 飿³é å 507 * 508 * [æ»ãå¤] 509 * ç¡ã 510 * 511 * ----------------------------------------------------------------------- 512 */ 513function ctrlPage(href){ 514 window.location.href = href; 515 return; 516} 517function ctrlPageJump(href){ 518 // ã¹ã¯ãã¼ã«ã®é度 519 var speed = 400; // ããªç§ 520 // ç§»åå ãåå¾ 521 var target = $(href == "#" || href == "" ? 'html' : href); 522 // ç§»åå ãæ°å¤ã§åå¾ 523 var position = target.offset().top; 524 // ã¹ã ã¼ã¹ã¹ã¯ãã¼ã« 525 $('body,html').animate({scrollTop:position}, speed, 'swing'); 526 return false; 527}
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.