1jQuery(function ($) { 2 var menu_trigger = $("#menu_trigger"); 3 var navi = $("#navi"); 4 var navi_close = $("#navi .close"); 5 var winHeight = $(window).height(); 6 var navHeight = winHeight - 102; 7 var property; 8 9 navi.hide(); 10 11 menu_trigger.on("click", function () { 12 navi.stop().slideToggle(); 13 navi.toggleClass("active"); 14 $(this).toggleClass("active"); 15 }); 16 navi_close.on("click", function () { 17 navi.stop().slideUp(); 18 navi.toggleClass("active"); 19 menu_trigger.toggleClass("active"); 20 }); 21 22 $(window).on("load resize", function () { 23 property = window.getComputedStyle($("body")[0], "::after").getPropertyValue("content"); 24 //console.log(property); 25 }); 26 27 var slide_foot = $(".slide_foot li"); 28 var slide_cont = $(".slide_body .slide_cont"); 29 slide_foot.on("click", function () { 30 slide_foot.removeClass("current"); 31 $(this).addClass("current"); 32 var current_index = $(this).index(); 33 slide_cont.removeClass("current"); 34 slide_cont.eq(current_index).addClass("current"); 35 }); 36 37 //ã«ã¬ã³ãã¼ãã©ã°ã¤ã³ 38 // $('#calendar').calendar(); 39 // $("th").removeClass("tue"); 40 // $(".next a").click(function(){ 41 // $("th").removeClass("tue"); 42 // }); 43 // $(".prev a").click(function(){ 44 // $("th").removeClass("tue"); 45 // }); 46}); 47 48/*ã¹ããã¡ãã¥ã¼ã¢ã³ã¼ãã£ãªã³*/ 49$(function () { 50 $("#navi .parent>p").click(function () { 51 $(this).parent().toggleClass("active"); 52 $(this).next(".child").slideToggle(); 53 }); 54}); 55 56/*ã¬ã¤ãã¢ã³ã¼ãã£ãªã³*/ 57$(function () { 58 $(".user_guide .guide_main h3").click(function () { 59 $(this).parent().toggleClass("active"); 60 $(this).next("p").slideToggle(); 61 }); 62}); 63 64/*ãã®ä»ãã¼ã¸ã¢ã³ã¼ãã£ãªã³*/ 65$(function () { 66 $(".accordion_wrap .ac_title").click(function () { 67 $(this).parent().toggleClass("active"); 68 $(this).next(".ac_inner").slideToggle(); 69 }); 70}); 71 72/*ã«ãã´ãªãã¼ã¸ãã£ã¨ã¿ããã¿ã³*/ 73$(function () { 74 $(".cate_head .more_btn").click(function () { 75 $(this).toggleClass("active"); 76 $("#cate_accordion").slideToggle(); 77 }); 78}); 79 80/*TOPã¹ã©ã¤ãã¼*/ 81/*$(function () { 82 $(".fv_slider").slick({ 83 centerMode: true, 84 centerPadding: "18%", 85 slidesToShow: 1, 86 slidesToScroll: 1, 87 speed: 2000, 88 autoplaySpeed: 4000, 89 //autoplay: true, 90 //fade: true, 91 dots: true, 92 arrows: true, 93 //pauseOnFocus: false, 94 //pauseOnHover: false, 95 //pauseOnDotsHover: false, 96 //swipe: false, 97 //swipeToSlide: false, 98 responsive: [ 99 { 100 breakpoint: 1200, 101 settings: { 102 centerPadding: "10%", 103 }, 104 }, 105 { 106 breakpoint: 992, 107 settings: { 108 centerPadding: "0%", 109 }, 110 }, 111 ], 112 }); 113});*/ 114 115/*TOPã¹ã©ã¤ãã¼*/ 116$(function () { 117 const mySwiper = new Swiper(".fv_swiper", { 118 loop: true, 119 autoplay: { 120 delay: 4000, 121 }, 122 speed: 1000, 123 centeredSlides: false, 124 slidesPerView: 1, 125 breakpoints: { 126 992: { 127 slidesPerView: 1.25, 128 centeredSlides: true, 129 }, 130 1200: { 131 slidesPerView: 1.56, 132 centeredSlides: true, 133 }, 134 }, 135 pagination: { 136 el: ".swiper-pagination", 137 }, 138 navigation: { 139 nextEl: ".swiper-button-next", 140 prevEl: ".swiper-button-prev", 141 }, 142 }); 143}); 144 145/*Aboutã¹ã©ã¤ãã¼(ã¡ã¤ã³ã¤ã¡ã¼ã¸)*/ 146$(function () { 147 $(".bg_slider").slick({ 148 slidesToShow: 1, 149 slidesToScroll: 1, 150 speed: 2000, 151 autoplaySpeed: 4000, 152 autoplay: true, 153 fade: true, 154 dots: false, 155 arrows: false, 156 pauseOnFocus: false, 157 pauseOnHover: false, 158 pauseOnDotsHover: false, 159 swipe: false, 160 swipeToSlide: false, 161 }); 162}); 163 164/*è¤æ°åçã¹ã©ã¤ãã¼*/ 165$(function () { 166 $(".photo_slider").slick({ 167 slidesToShow: 1, 168 slidesToScroll: 1, 169 speed: 2000, 170 autoplaySpeed: 3000, 171 autoplay: true, 172 dots: true, 173 arrows: true, 174 }); 175}); 176 177/*è¤æ°åçã¹ã©ã¤ãã¼ï¼SPã®ã¿ï¼*/ 178$(function () { 179 function sliderSetting() { 180 var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; 181 //console.log(width + "(1)"); 182 if (width <= 768) { 183 $(".photo_slider_sp").not(".slick-initialized").slick({ 184 slidesToShow: 1, 185 slidesToScroll: 1, 186 speed: 2000, 187 autoplaySpeed: 3000, 188 autoplay: true, 189 dots: true, 190 arrows: true, 191 }); 192 } else { 193 $(".slide.slick-initialized").slick("unslick"); 194 } 195 } 196 sliderSetting(); 197 $(window).resize(function () { 198 var width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; 199 //console.log(width + "(2)"); 200 if (width <= 768) { 201 sliderSetting(); 202 } else { 203 $(".photo_slider_sp").slick("unslick"); 204 } 205 }); 206}); 207 208/*ã©ã³ãã³ã°ã¹ã©ã¤ãã¼*/ 209/*function checkBreakPoint() { 210 w = $(window).width(); 211 if (w <= 767) { 212 // ã¹ããåãï¼767px以ä¸ã®ã¨ãï¼ 213 $(".ranking .column-set").not(".slick-initialized").slick({ 214 //ã¹ã©ã¤ãããã 215 slidesToShow: 2.3, 216 slidesToScroll: 1, 217 speed: 2000, 218 autoplay: false, 219 fade: false, 220 dots: false,
221 arrows: false, 222 pauseOnFocus: false, 223 pauseOnHover: false, 224 pauseOnDotsHover: false, 225 swipe: true, 226 swipeToSlide: true, 227 rows: 2, 228 infinite: false, 229 }); 230 } else { 231 // PCåã 232 $(".ranking .column-set.slick-initialized").slick("unslick"); 233 } 234} 235// ã¦ã¤ã³ãã¦ããªãµã¤ãºãã度ã«ãã§ã㯠236$(window).resize(function () { 237 checkBreakPoint(); 238}); 239// ååãã§ã㯠240$(function () { 241 checkBreakPoint(); 242});*/ 243 244/*ã©ã³ãã³ã°ã¹ã©ã¤ãã¼*/ 245/*$(function() { 246 var swiper; 247 //ååå¦ç 248 var w = $(window).width(); 249 if (w <= 767) { 250 $("#main section .ranking .column-set").addClass("swiper-wrapper"); 251 $("#main section .ranking .column-set .column5").addClass("swiper-slide"); 252 swiper = new Swiper('.ranking', { 253 slidesPerView: 2.3, 254 grid: { 255 rows: 2, 256 }, 257 loop: false, 258 }); 259 } 260 //ãªãµã¤ãºã§ã®å¦ç 261 $(window).on('load resize', function(){ 262 var w = $(window).width(); 263 if (w <= 767) { 264 if (swiper) { 265 return; 266 } else { 267 $("#main section .ranking .column-set").addClass("swiper-wrapper"); 268 $("#main section .ranking .column-set .column5").addClass("swiper-slide"); 269 swiper = new Swiper('.ranking', { 270 slidesPerView: 2.5, 271 grid: { 272 rows: 2, 273 }, 274 loop: false, 275 }); 276 } 277 } else { 278 if (swiper) { 279 swiper.destroy(); 280 swiper = undefined; 281 $("#main section .ranking .column-set").removeClass("swiper-wrapper"); 282 } 283 } 284 }); 285}); */ 286 287/*ã©ã³ãã³ã° ã¹ãã表示ãã£ã¨è¦ã*/ 288$(function () { 289 //ãã£ã¨è¦ããã¿ã³ã追å 290 $("#main section .ranking .column-set").after('<a class="more_btn">ãã£ã¨è¦ã</a>'); 291 292 //é表示ã«ããæ°ãè¨å® 293 var moreNum = 6; 294 $("#main section .ranking .column-set .column5:nth-child(n + " + (moreNum + 1) + ")").addClass("is-hidden"); 295 296 $("#main section .ranking .more_btn").on("click", function () { 297 if ($(this).hasClass("open")) { 298 $("#main section .ranking .column-set .column5:nth-child(n + " + (moreNum + 1) + ")").addClass("is-hidden"); 299 $("#main section .ranking .more_btn").text("ãã£ã¨è¦ã"); 300 $("#main section .ranking .more_btn").removeClass("open"); 301 } else { 302 $("#main section .ranking .column-set .column5.is-hidden").slice(0, moreNum).removeClass("is-hidden"); 303 if ($("#main section .ranking .column-set .column5.is-hidden").length == 0) { 304 $("#main section .ranking .more_btn").text("æãããã"); 305 $("#main section .ranking .more_btn").addClass("open"); 306 } 307 } 308 }); 309 310 $(function () { 311 var list = $("#main section .ranking .column-set .column5").length; 312 if (list < moreNum) { 313 $("#main section .ranking .more_btn").addClass("is-btn-hidden"); 314 } 315 }); 316}); 317 318/*TOPèªååºåç®æå¤æ´*/ 319$(function () { 320 //ã©ã³ãã³ã° 321 $("#main section .ranking>h2").html("- RANKING -<span>人æ°åå</span>"); 322 //ãç¥ãã 323 $("#main section .news>h2").html("- NEWS -<span>ææ°æ å ±</span>"); 324}); 325 326/*ããã¿ã¼è¡¨ç¤ºå¤æ´*/ 327$(window).on("load", function () { 328 if (document.URL.match(/tokushoho/) || document.URL.match(/privacypolicy/)) { 329 $(".gift_service").hide(); 330 $(".user_guide").hide(); 331 } 332}); 333 334/*ãããã¼PCã¡ãã¥ã¼*/ 335$(function () { 336 $(".has_menu > a").click(function () { 337 if ($(this).hasClass("active")) { 338 $(".has_menu > .active").next(".menu").slideUp(); 339 $(".has_menu > .active").next(".menu").removeClass("active"); 340 $(".has_menu > a").removeClass("active"); 341 } else { 342 $(".has_menu > .active").next(".menu").slideUp(); 343 $(".has_menu > .active").next(".menu").removeClass("active"); 344 $(".has_menu > a").removeClass("active"); 345 346 $(this).toggleClass("active"); 347 $(this).next().toggleClass("active"); 348 $(this).next().slideToggle(); 349 } 350 }); 351}); 352 353/*ã¿ãåæ¿*/ 354/*$(function () { 355 $(".tab_btn_list .tab_btn").click(function () { 356 var index = $(this).parent(".tab_btn_list").children(".tab_btn").index(this); 357 $(this).parent(".tab_btn_list").children(".tab_btn").removeClass("active"); 358 $(this).parent(".tab_btn_list").next(".tab_area").children(".tab_box").removeClass("active"); 359 $(this).addClass("active"); 360 $(this).parent(".tab_btn_list").next(".tab_area").children(".tab_box").eq(index).addClass("active"); 361 }); 362});*/ 363 364/*ã¹ã ã¼ã¹ã¹ã¯ãã¼ã«*/ 365$(function () { 366 $('a[href^="#"]').on("click", function () { 367 var speed = 600; 368 var header_height = $("#header").height(); 369 var href = $(this).attr("href"); 370 var target = $(href == "#" || href == "" ? "html" : href); 371 var position = target.offset().top - header_height; 372 $("body,html").animate({ scrollTop: position }, speed, "swing"); 373 return false; 374 }); 375}); 376$(function () { 377 $("#search_price_btn").on("click", function () { 378 var pos = $("#search_price").offset().top; 379 var headerHeight = $("#header").outerHeight() + 20; 380 $("body,html").animate({ scrollTop: pos - headerHeight }, 600); 381 return false; 382 }); 383}); 384 385/*å¥ãã¼ã¸ã¸ã®ã¢ã³ã«ã¼ãªã³ã¯é«ã調æ´*/ 386$(window).on("load", function () { 387 const url = $(location).attr("href"), 388 headerHeight = $("#header").outerHeight() + 20; 389 390 if (url.indexOf("#") != -1) { 391 const anchor = url.split("#"), 392 target = $("#" + anchor[anchor.length - 1]), 393 position = Math.floor(target.offset().top) - headerHeight; 394 $("html, body").animate({ scrollTop: position }, 500); 395 } 396}); 397
398/*ã®ããã©ããã³ã°ãã¼ã¸ ã¢ã³ã¼ãã£ãªã³é¨å*/ 399$(function () { 400 if ($("#gift_detail").length) { 401 $("#gift_detail").load("https://o-ki.co.jp/common/giftwrapping_detail.html"); 402 } 403}); 404 405/*åå詳細*/ 406// è¦ç´ ä¸¦ã³æ¿ã 407$(function () { 408 $("#item_detail_top_add .item_shipping").appendTo("#pi_cart"); 409 $("#item_detail_top_add .item_line").appendTo("#pi_cart"); 410 $("#pi_cart #spsVarpriceBox .option_area").appendTo("#pi_cart > .spec"); 411}); 412// ååç»ååãæ¿ã 413$(function () { 414 $(".itemThumb-wrap .itemThumb li").click(function () { 415 var ch_img = $(this).children("img").attr("src"); 416 //console.log(ch_img); 417 $(".itemThumb-wrap .itemThumb li").removeClass("active"); 418 $(this).addClass("active"); 419 $(".itemThumb-wrap .itemThumb-main img").attr("src", ch_img); 420 }); 421}); 422//ã客æ§ã®å£° 423$(function () { 424 $(".userreview>h2").html("-ã客æ§ã®å£°-"); 425 $(".userreview>.more a").html("ãã£ã¨ã¿ã"); 426}); 427//è©ä¾¡â ãã¼ã¯å¤æ´ 428$(function () { 429 if ($(".review_txt, .userreview_rate, .reviewBox_item, .reviewTxt").length) { 430 $(".review_txt img, .userreview_rate img, .reviewBox_item ul li img, .reviewTxt ul li img").each(function () { 431 if ($(this).attr("src").indexOf("/hpgen/HPB/theme/img/rate_on.png") >= 0) { 432 $(this).attr("src", "/common/img/item/star.png"); 433 } 434 if ($(this).attr("src").indexOf("/hpgen/HPB/theme/img/rate_half.png") >= 0) { 435 $(this).attr("src", "/common/img/item/star_half.png"); 436 } 437 }); 438 } 439}); 440//æå夿´ 441/*$(function () { 442 $(".quantityArea th:first-child").html("è³¼å ¥ã°ã©ã "); 443 $(".option_area th:first-child").html("å è£ ç®±"); 444});*/ 445//å è£ ç®±ãããã¢ãã 446$(function () { 447 $(".option_area th:first-child").append('<span class="pop_btn"></span>'); 448 $(".modal_pop").hide(); 449 $(".pop_btn").on("click", function () { 450 $(".modal_pop").fadeIn(); 451 }); 452 $(".js-modal-close").on("click", function () { 453 $(".modal_pop").fadeOut(); 454 }); 455 $(".modal_pop .close_btn").on("click", function () { 456 $(".modal_pop").fadeOut(); 457 }); 458}); 459//ã©ã³ãã³ã°ã¢ã¤ã³ã³é表示 460$(function () { 461 if ($(".ico_itemType").length) { 462 $(".ico_itemType li").each(function () { 463 if ($(this).children("img").attr("alt").indexOf("ã©ã³ãã³ã°") >= 0) { 464 $(this).hide(); 465 } 466 }); 467 } 468}); 469//ã«ã¼ãä¸ã«è¦ç´ ç§»å 470$(function () { 471 if ($(".js-movetop").length) { 472 $(".js-movetop").insertBefore("#itemDetail-wrap.__area01"); 473 } 474}); 475 476/*TOPã¸æ»ããã¿ã³*/ 477$(function () { 478 var pagetop = $("#page_top"); 479 // ãã¿ã³é表示 480 pagetop.hide(); 481 // 100px ã¹ã¯ãã¼ã«ããããã¿ã³è¡¨ç¤º 482 $(window).scroll(function () { 483 if ($(this).scrollTop() > 100) { 484 pagetop.fadeIn(); 485 } else { 486 pagetop.fadeOut(); 487 } 488 }); 489 pagetop.click(function () { 490 $("body, html").animate({ scrollTop: 0 }, 500); 491 return false; 492 }); 493}); 494 495/*FVåºå®ãã¶ã¤ã³*/ 496function stickyBackground() { 497 var header_height = $("#header").height(); 498 $(".sticky_bg").css("top", header_height); 499} 500// ã¦ã¤ã³ãã¦ããªãµã¤ãºãã度ã«ãã§ã㯠501$(window).resize(function () { 502 stickyBackground(); 503}); 504// ååãã§ã㯠505$(function () { 506 stickyBackground(); 507}); 508$(function () { 509 var window_height = $(window).height(); 510 var noneItem = $(".js_scroll_none"); 511 $(window).scroll(function () { 512 if ($(this).scrollTop() > window_height / 1.5) { 513 noneItem.fadeOut(); 514 } else { 515 noneItem.fadeIn(); 516 } 517 }); 518}); 519 520/*ååä¸è¦§ãã¼ã¸*/ 521$(function () { 522 //URLã«ç¹å®ã®æåãå«ã¾ãã¦ããå ´å 523 if (document.URL.match(/itemlist/)) { 524 $("#itemList_wrap").prepend( 525 '\ 526 <div class="cate_head">\ 527 <div class="cate_head_img">\ 528 <img src="common/img/category/head_itemlist_pc.jpg" alt="ååä¸è¦§" class="pc_only">\ 529 <img src="common/img/category/head_itemlist.jpg" alt="ååä¸è¦§" class="sp_only">\ 530 </div>\ 531 <div class="cate_head_text">\ 532 <h2>ååä¸è¦§</h2>\ 533 </div>\ 534 </div>\ 535 ', 536 ); 537 } 538 539 //æ¬çªç¨ 540 //var url = location.href; 541 //if(url == 'https://o-ki.co.jp/SHOP/list.php'){ 542 if (document.URL.match(/list.php/)) { 543 var searchWord = getParam("Search"); 544 if (searchWord == null || searchWord == "") { 545 $("#itemList_wrap").prepend( 546 '\ 547 <div class="cate_head">\ 548 <div class="cate_head_img">\ 549 <img src="/common/img/category/head_itemlist.jpg" alt="ååä¸è¦§" class="pc_only">\ 550 <img src="/common/img/category/head_itemlist.jpg" alt="ååä¸è¦§" class="sp_only">\ 551 </div>\ 552 <div class="cate_head_text">\ 553 <h2>ååä¸è¦§</h2>\ 554 </div>\ 555 </div>\ 556 ', 557 ); 558 } else { 559 $("#itemList_wrap").prepend( 560 '\ 561 <div class="cate_head">\ 562 <div class="cate_head_img">\ 563 <img src="/common/img/category/head_itemlist.jpg" alt="ååä¸è¦§" class="pc_only">\ 564 <img src="/common/img/category/head_itemlist.jpg" alt="ååä¸è¦§" class="sp_only">\ 565 </div>\ 566 <div class="cate_head_text">\ 567 <h2>"' + 568 searchWord + 569 '"ã®æ¤ç´¢çµæ</h2>\ 570 </div>\ 571 </div>\ 572 ', 573 ); 574 } 575 } 576 577 //æ¤ç´¢ã¯ã¼ãæ½åº 578 function getParam(name, url) { 579 if (!url) url = window.location.href; 580 name = name.replace(/[\[\]]/g, "\\$&"); 581 var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), 582 results = regex.exec(url); 583 if (!results) return null; 584 if (!results[2]) return ""; 585 return decodeURIComponent(results[2].replace(/\+/g, " "));
586 } 587}); 588 589/*ç¹åæ³ãã¼ã¸ããã¿ã¼ã®ã¬ã¤ãé表示*/ 590$(function () { 591 var url = location.href; 592 if (url == "https://o-ki.co.jp/hpgen/HPB/shop/business.html") { 593 $(".gift_service").hide(); 594 $(".user_guide").hide(); 595 } 596}); 597 598/*é å¸ä¼ãã¼ã¸*/ 599//é å¸ä¼ãã¼ã¸ ãã©ã³è©³ç´°é¨åèªã¿è¾¼ã¿ 600$(function () { 601 if ($("#hanpu_detail").length) { 602 $("#hanpu_detail").load("https://o-ki.co.jp/common/hanpu_detail.html"); 603 } 604}); 605//ã¡ãã¥ã¼ä¸è¦§ã¹ãã表示ã¹ã©ã¤ãã¼ 606$(function () { 607 let swipersItems = []; 608 const breakPoint = 768; 609 let swipers = document.querySelectorAll(".menu_list_swiper"); 610 var swiperSlide = $(".menu_list_swiper .menu_list_wrap"); 611 var flag = 0; 612 window.addEventListener( 613 "load", 614 () => { 615 const options = { 616 loop: true, 617 autoplay: true, 618 speed: 1000, 619 pagination: { 620 el: ".swiper-pagination", 621 }, 622 }; 623 // IDãæ ¼ç´ 624 swipers.forEach((element, index) => { 625 if (window.innerWidth <= breakPoint) { 626 do { 627 swiperSlide.children(".hanpu_menu:lt(4)").wrapAll('<div class="sp_wrap swiper-slide"></div>'); 628 } while (swiperSlide.children(".hanpu_menu").length); 629 swipersItems[index] = new Swiper("#" + element.id, options); 630 } else { 631 swipersItems[index] = undefined; 632 } 633 }); 634 window.addEventListener( 635 "resize", 636 () => { 637 swipers.forEach((element, index) => { 638 if (window.innerWidth <= breakPoint) { 639 do { 640 swiperSlide.children(".hanpu_menu:lt(4)").wrapAll('<div class="sp_wrap swiper-slide"></div>'); 641 } while (swiperSlide.children(".hanpu_menu").length); 642 if (swipersItems[index] === undefined) { 643 swipersItems[index] = new Swiper("#" + element.id, options); 644 } 645 flag = 0; 646 } else { 647 if (swipersItems[index] !== undefined) { 648 swipersItems[index].destroy(); 649 swipersItems[index] = undefined; 650 } 651 flag = 1; 652 } 653 return; 654 }); 655 if (flag == 1) { 656 $(".sp_wrap").each(function () { 657 $(this).children(".hanpu_menu:first-child").unwrap(); 658 }); 659 } 660 }, 661 false, 662 ); 663 }, 664 false, 665 ); 666}); 667//ã³ã¼ã¹ã¿ãåãæ¿ã 668$(function () { 669 var tabTarget = $(".hanpu_course .tab_area .tab"); 670 var selectAll = $(".hanpu_course .tab_area .tab, .hanpu_course .content_area .content"); 671 var tabContent = $(".hanpu_course .content_area .content"); 672 tabTarget.on("click", function () { 673 selectAll.removeClass("active"); 674 $(this).addClass("active"); 675 var index = tabTarget.index(this); 676 tabContent.eq(index).addClass("active"); 677 }); 678}); 679//ã¡ãã¥ã¼åãæ¿ã 680$(function () { 681 var tabTarget = $(".hanpu_menu_list .menu_list .menu_list_wrap .hanpu_menu"); 682 tabTarget.on("click", function () { 683 var tabContent = $(this).parents(".hanpu_menu_list").find(".menu_detail>ul>li"); 684 var num = $(this).attr("datanum") - 1; 685 686 tabContent.removeClass("active"); 687 $(this).addClass("active"); 688 tabContent.eq(num).addClass("active"); 689 $("html,body").animate({ scrollTop: $(this).parents(".hanpu_menu_list").find(".menu_detail").offset().top - $("#header").height() }); 690 }); 691}); 692//ã¡ãã¥ã¼ä¸è¦§æåæ°å¶é 693$(function () { 694 var count = 18; 695 $(".hanpu_menu_list .menu_list .menu_list_wrap .hanpu_menu .name").each(function () { 696 var thisText = $(this).text(); 697 var textLength = thisText.length; 698 if (textLength > count) { 699 var showText = thisText.substring(0, count); 700 var insertText = (showText += "â¦"); 701 $(this).html(insertText); 702 } 703 }); 704}); 705//ããããã質åã¢ã³ã¼ãã£ãªã³ 706$(function () { 707 $(".hanpu_faq .faq_list dl dt").click(function () { 708 $(this).toggleClass("active"); 709 $(this).next("dd").slideToggle(); 710 }); 711}); 712 713/*ãä¸å ãã¼ã¸*/ 714//ãä¸å ãã¼ã¸ã³ã³ãã³ãèªã¿è¾¼ã¿ 715$(function () { 716 if ($("#summer_gift_detail").length) { 717 $("#summer_gift_detail").load("https://o-ki.co.jp/common/summer_gift_detail.html"); 718 } 719}); 720/*ãæ³æ®ãã¼ã¸*/ 721//ãæ³æ®ãã¼ã¸ã³ã³ãã³ãèªã¿è¾¼ã¿ 722$(function () { 723 if ($("#yearend_gift_detail").length) { 724 $("#yearend_gift_detail").load("https://o-ki.co.jp/common/yearend_gift_detail.html"); 725 } 726}); 727/*ãå¹´è³ãã¼ã¸*/ 728//ãå¹´è³ãã¼ã¸ã³ã³ãã³ãèªã¿è¾¼ã¿ 729$(function () { 730 if ($("#newyear_detail").length) { 731 $("#newyear_detail").load("https://o-ki.co.jp/common/newyear_detail.html"); 732 } 733}); 734/*å ¥å¦ç¥ãã¼ã¸*/ 735//å ¥å¦ç¥ãã¼ã¸ã³ã³ãã³ãèªã¿è¾¼ã¿ 736$(function () { 737 if ($("#admission_detail").length) { 738 $("#admission_detail").load("https://o-ki.co.jp/common/admission_detail.html"); 739 } 740}); 741/*ç¶ã®æ¥ãã¼ã¸*/ 742//ç¶ã®æ¥ãã¼ã¸ã³ã³ãã³ãèªã¿è¾¼ã¿ 743$(function () { 744 if ($("#fathersday_detail").length) { 745 $("#fathersday_detail").load("https://o-ki.co.jp/common/fathersday_detail.html"); 746 } 747}); 748//ååå¥ã©ã³ãã³ã°ã¿ãåãæ¿ã 749$(function () { 750 var tabTarget = $(".summer_gift_ranking .tab_area .tab"); 751 var selectAll = $(".summer_gift_ranking .tab_area .tab, .summer_gift_ranking .content_area .content"); 752 var tabContent = $(".summer_gift_ranking .content_area .content"); 753 tabTarget.on("click", function () { 754 selectAll.removeClass("active"); 755 $(this).addClass("active"); 756 var index = tabTarget.index(this); 757 tabContent.eq(index).addClass("active"); 758 }); 759}); 760//ä¾¡æ ¼å¸¯å¥ã¿ãåãæ¿ã 761$(function () { 762 var tabTarget = $(".summer_gift_price .tab_area .tab"); 763 var selectAll = $(".summer_gift_price .tab_area .tab, .summer_gift_price .content_area .content"); 764 var tabContent = $(".summer_gift_price .content_area .content"); 765 tabTarget.on("click", function () { 766 selectAll.removeClass("active"); 767 $(this).addClass("active"); 768 var index = tabTarget.index(this); 769 tabContent.eq(index).addClass("active"); 770 }); 771}); 772//ã«ã¿ãã°ã®ããã¿ãåãæ¿ã 773$(function () { 774 var tabTarget = $(".summer_gift_catalog .tab_area .tab"); 775 var selectAll = $(".summer_gift_catalog .tab_area .tab, .summer_gift_catalog .content_area .content"); 776 var tabContent = $(".summer_gift_catalog .content_area .content"); 777 tabTarget.on("click", function () { 778 selectAll.removeClass("active"); 779 $(this).addClass("active"); 780 var index = tabTarget.index(this); 781 tabContent.eq(index).addClass("active"); 782 }); 783}); 784//ã«ã¿ãã°ã®ãã ã¹ããã¹ã©ã¤ãã¼ 785$(function () { 786 let swipersItems = [];
787 const breakPoint = 768; 788 let swipers = document.querySelectorAll(".catalog_swiper"); 789 window.addEventListener( 790 "load", 791 () => { 792 const options = { 793 slidesPerView: 2.1, 794 spaceBetween: 15, 795 loop: false, 796 //autoplay: true, 797 speed: 1000, 798 pagination: { 799 el: ".swiper-pagination", 800 clickable: true, 801 }, 802 breakpoints: { 803 576: { 804 slidesPerView: 2.5, 805 }, 806 }, 807 }; 808 // IDãæ ¼ç´ 809 swipers.forEach((element, index) => { 810 if (window.innerWidth <= breakPoint) { 811 swipersItems[index] = new Swiper("#" + element.id, options); 812 } else { 813 swipersItems[index] = undefined; 814 } 815 }); 816 window.addEventListener( 817 "resize", 818 () => { 819 swipers.forEach((element, index) => { 820 if (window.innerWidth <= breakPoint) { 821 if (swipersItems[index] === undefined) { 822 swipersItems[index] = new Swiper("#" + element.id, options); 823 } 824 } else { 825 if (swipersItems[index] !== undefined) { 826 swipersItems[index].destroy(); 827 swipersItems[index] = undefined; 828 } 829 } 830 return; 831 }); 832 }, 833 false, 834 ); 835 }, 836 false, 837 ); 838}); 839 840//TOP 米沢ç黿¨ã«ã¤ãã¦ã¢ã³ã¼ãã£ãªã³ 841$(function () { 842 $(".philosophy_more_text .more_btn").click(function () { 843 $(this).toggleClass("active"); 844 if ($(this).hasClass("active")) { 845 $(this).children(".btn").text("æãããã"); 846 } else { 847 $(this).children(".btn").text("ãã£ã¨ã¿ã"); 848 } 849 $(this).prev(".more_text").slideToggle(); 850 }); 851}); 852 853// TOPãææ°æ å ±ãã£ã¨è¦ã追å 854$(function () { 855 //ãã£ã¨è¦ããã¿ã³ã追å 856 $("#main section .news .news-contents").after('<div class="more_btn"><a href="/hpgen/HPB/entries/159.html">æ°çæ å ±ä¸è¦§</a></div>'); 857}); 858 859// ãªãã¤ã¬ã¯ã 860$(function () { 861 // ç¾å¨ã®URLãåå¾ 862 var currentUrl = window.location.href; 863 864 // ç¹å®ã®URLããã§ã㯠865 if (currentUrl.includes("/hpgen/HPB/shop/sitemap.html")) { 866 // ãªãã¤ã¬ã¯ãããURLã«å¤æ´ 867 window.location.href = "/"; 868 } 869 if (currentUrl.includes("/hpgen/HPB/shop/shoppinguide.html")) { 870 // ãªãã¤ã¬ã¯ãããURLã«å¤æ´ 871 window.location.href = "/hpgen/HPB/entries/5.html#sec02"; 872 } 873 if (currentUrl.includes("/hpgen/HPB/categories/23029.html")) { 874 // ãªãã¤ã¬ã¯ãããURLã«å¤æ´ 875 window.location.href = "/"; 876 } 877 if (currentUrl.includes("/hpgen/HPB/categories/23009.html")) { 878 // ãªãã¤ã¬ã¯ãããURLã«å¤æ´ 879 window.location.href = "/SHOP/379126/list.html"; 880 } 881 if (currentUrl.includes("/hpgen/HPB/categories/25278.html")) { 882 // ãªãã¤ã¬ã¯ãããURLã«å¤æ´ 883 window.location.href = "/SHOP/YIG-001.html"; 884 } 885}); 886 887// TOPã©ã³ãã³ã°ãã«ã¼ããã¿ã³è¿½å 888$(function () { 889 $(".ranking .column5").each(function () { 890 var $column = $(this); 891 892 // ååãã¼ã¸ã®ãªã³ã¯ããååçªå·ãåå¾ 893 var href = $column.find("h3 a, .itemThumb a").first().attr("href"); 894 895 if (href) { 896 var match = href.match(/\/SHOP\/([^\/]+)\.html$/i); 897 898 if (match) { 899 var itemNo = match[1]; 900 901 // ã«ã¼ããã¿ã³ã使 902 var $cartBtn = $("<a>", { 903 href: "https://o-ki.co.jp/CART/cart.php?ITM=" + itemNo + "&CNT=1", 904 text: "ã«ã¼ãã«å ¥ãã", 905 class: "cart-btn", 906 }); 907 908 // .column5 ã®æå¾ã«è¿½å 909 $column.append($cartBtn); 910 } 911 } 912 }); 913}); 914 915// ååãã¼ã¸ãåºå®ã«ã¼ããã¿ã³ 916$(function () { 917 if ($(".fix_cart_area").length) { 918 $(".shopping_form").clone(true).appendTo(".fix_cart_area"); 919 } 920});
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.