1$(document).ready(function () { 2 3 var $pageTop = $(".pagetop"); 4 var $footer = $("#footer"); 5 var lastScrollTop = 0; 6 var spFoot = $('.footer__03'); 7 var spFootH = spFoot.innerHeight(); 8 var win = $(window).innerWidth(); // ã¦ã£ã³ãã¦å¹ ã夿°ã«æ ¼ç´ 9 10 spFoot.css('bottom', `-${spFootH}px`); // spFootã®åæãç»é¢å¤ã«ãã 11 12 $(window).on('resize', function() { 13 win = $(window).innerWidth(); // ãªãµã¤ãºæã«ã¦ã£ã³ãã¦å¹ ãæ´æ° 14 }); 15 16 $(window).scroll(function () { 17 var st = $(this).scrollTop(); 18 var winH = $(window).innerHeight(); 19 var headerH = $('.header').outerHeight(); 20 var footerT = $footer.offset().top; 21 var spFootH = spFoot.innerHeight(); 22 var chat = $('#chatplusview');ã// ãã£ãã 23 var orderBtn = $('.reviewScrollProductBox');ã// ã¬ãã¥ã¼ãã¼ã¸ã®è¿½å¾æ³¨æãã¿ã³ 24 var productOrderBtn = $('.product.orderBtn'); // ååãã¼ã¸ã®è¿½å¾æ³¨æãã¿ã³ 25 var tableContentsSwitch = $('.tableContentsSwitch');ã// æ¤ç´¢ãã¼ã¸ã®ç®æ¬¡ 26 if (st > lastScrollTop) { 27 // ä¸ã«ã¹ã¯ãã¼ã« 28 $pageTop.stop(true, true).removeClass("show"); 29 if (win <= 750) { 30 chat.hide(); 31 if (orderBtn.length) { 32 orderBtn.css('bottom','0'); 33 } 34 if (productOrderBtn.length) { 35 productOrderBtn.css('bottom','3vw'); 36 } 37 if (tableContentsSwitch.length) { 38 if ($('.page_productData').length) { 39 tableContentsSwitch.css('bottom','22vw'); // åå詳細ãã¼ã¸ 40 } else { 41 tableContentsSwitch.css('bottom','5vw'); // æ¤ç´¢ãã¼ã¸ 42 } 43 44 if (st > (footerT - winH)) { 45 tableContentsSwitch.hide() 46 } 47 } 48 } else { 49 chat.show(); 50 } 51 52 // ååãã¼ã¸ã®è¿½å¾æ³¨æãã¿ã³ 53 if (productOrderBtn.length) { 54 let targetContent = $('.pro_detail_wrap_01').offset().top; 55 let targetContentH = $('.pro_detail_wrap_01').outerHeight(); 56 let spTargetContentH = $('.info__item.main.show__sp').outerHeight(); 57 if (st > (targetContent + targetContentH - headerH - spTargetContentH)) { 58 productOrderBtn.addClass('active'); 59 tableContentsSwitch.css('bottom','22vw'); 60 if (st > (footerT - winH)) { 61 productOrderBtn.removeClass('active'); 62 tableContentsSwitch.css('bottom','5vw'); 63 } 64 } else { 65 productOrderBtn.removeClass('active'); 66 tableContentsSwitch.css('bottom','5vw'); 67 } 68 } 69 70 if (win <= 1120) { 71 if (orderBtn.length) { 72 if (st > (footerT - winH)) { 73 orderBtn.hide() 74 } 75 } 76 } 77 78 spFoot.css('bottom', `-${spFootH}px`); 79 if ($(this).height() + $(this).scrollTop() - ($pageTop.height() * 3) > $footer.offset().top) { 80 $pageTop.stop(true, true).addClass("show"); 81 $pageTop.removeClass("fixed"); 82 } 83 } else { 84 // ä¸ã«ã¹ã¯ãã¼ã« 85 if ($(this).scrollTop() > 100) { 86 $pageTop.stop(true, true).addClass("show"); 87 } else { 88 $pageTop.stop(true, true).removeClass("show"); 89 } 90 spFoot.css('bottom', '0'); 91 if (win <= 750) { 92 if ($(this).height() + $(this).scrollTop() - ($pageTop.height() * 3) <= $footer.offset().top) { 93 $pageTop.addClass("fixed"); 94 chat.show(); 95 } 96 if (orderBtn.length) { 97 orderBtn.css('bottom','17vw'); 98 } 99 if (productOrderBtn.length) { 100 productOrderBtn.css('bottom','20vw'); 101 } 102 if (tableContentsSwitch.length) { 103 tableContentsSwitch.show(); 104 if ($('.page_productData').length) { 105 tableContentsSwitch.css('bottom','38vw'); // åå詳細ãã¼ã¸ 106 } else { 107 tableContentsSwitch.css('bottom','20vw'); // æ¤ç´¢ãã¼ã¸ 108 } 109 } 110 } 111 112 if (win <= 1120) { 113 if (orderBtn.length) { 114 orderBtn.show() 115 } 116 } 117 118 // ååãã¼ã¸ã®è¿½å¾æ³¨æãã¿ã³ 119 if (productOrderBtn.length) { 120 let targetContent = $('.pro_detail_wrap_01').offset().top; 121 let targetContentH = $('.pro_detail_wrap_01').outerHeight(); 122 let spTargetContentH = $('.info__item.main.show__sp').outerHeight(); 123 if (st < (targetContent + targetContentH - headerH - spTargetContentH)) { 124 productOrderBtn.removeClass('active'); 125 tableContentsSwitch.css('bottom','22vw'); 126 } else { 127 productOrderBtn.addClass('active'); 128 tableContentsSwitch.css('bottom','38vw'); 129 } 130 } 131 } 132 lastScrollTop = st; 133 }); 134 135 136 137 $pageTop.click(function () { 138 $('body,html').animate({ 139 scrollTop: 0 140 }, 600); 141 return false;
142 }); 143 144 $('.nav__02 li a').click(function (event) { 145 var href = $(this).attr('href'); 146 147 if (href === 'javascript:void(0)') { 148 // Thá»±c hiá»n lá»nh jQuery á» Äây 149 $(this).toggleClass('active'); 150 event.preventDefault(); 151 var submenu = $(this).next('.ul'); 152 if (submenu.is(':visible')) { 153 submenu.slideUp(); 154 } else { 155 submenu.slideDown(); 156 } 157 } 158 }); 159 160 161 162 163 164 // header PCç¨ã¡ãã¥ã¼ã«ãã´ãª 165 let cat = $('.header .nav__02 .ul.cat').clone().addClass('pc_cat'); 166 let body = $('.header .nav__02 .ul.body').clone().addClass('pc_cat'); 167 let eventSale = $('.header .nav__02 .ul.event_sale').clone().addClass('pc_cat'); 168 let medical = $('.header .nav__02 .ul.medical').clone().addClass('pc_cat'); 169 let guide = $('.header .nav__02 .ul.guide').clone().addClass('pc_cat'); 170 $('.header__gp-02 .cat_menu').append(cat); 171 $('.header__gp-02 .body_menu').append(body); 172 $('.header__gp-02 .event_sale_menu').append(eventSale); 173 $('.header__gp-02 .medical_menu').append(medical); 174 $('.header__gp-02 .guide_menu').append(guide); 175 176 $('.header__ul-03 .cat_menu > a').on('click' ,function(){ 177 $('.header__ul-03 .ul').slideUp(); 178 $(this).next('.ul').slideToggle(); 179 }); 180 $('.header__ul-03 .body_menu > a').on('click' ,function(){ 181 $('.header__ul-03 .ul').slideUp(); 182 $(this).next('.ul').slideToggle(); 183 }); 184 $('.header__ul-03 .event_sale_menu > a').on('click' ,function(){ 185 $('.header__ul-03 .ul').slideUp(); 186 $(this).next('.ul').slideToggle(); 187 }); 188 $('.header__ul-03 .medical_menu > a').on('click' ,function(){ 189 $('.header__ul-03 .ul').slideUp(); 190 $(this).next('.ul').slideToggle(); 191 }); 192 $('.header__ul-03 .guide_menu > a').on('click' ,function(){ 193 $('.header__ul-03 .ul').slideUp(); 194 $(this).next('.ul').slideToggle(); 195 }); 196 $(document).on('click', '.header__gp-02 .cat_list .toggle_mark', function(){ 197 var clickedSubCatBox = $(this).next('.sub_cat_box'); 198 $('.cat_list .toggle_mark').not(this).removeClass('active').next('.sub_cat_box').slideUp(); 199 clickedSubCatBox.slideToggle(); 200 $(this).toggleClass('active'); 201 }); 202 $(document).on('click', function(e) { 203 if ($(e.target).closest('.header__ul-03').length === 0) { 204 $('.header__ul-03 .ul').slideUp(); 205 } 206 }); 207 208 // header SPç¨ã¡ãã¥ã¼ã«ãã´ãª 209 $('.nav .nav__02 .ul .add .toggle_mark').on('click',function(){ 210 $('.nav .nav__02 .ul .add .toggle_mark').not(this).removeClass('active').next('.sub_cat_box').slideUp(); 211 $(this).next('.sub_cat_box').slideToggle(); 212 $(this).toggleClass('active'); 213 }); 214 215 216 // ããã ã«ãã´ãªããæ¢ã 217 $('.wrap__ul-01 .add .toggle_mark').on('click',function(){ 218 $('.wrap__ul-01 .add .toggle_mark').not(this).removeClass('active').next('.sub_cat_box').slideUp(); 219 $(this).next('.sub_cat_box').slideToggle(); 220 $(this).toggleClass('active'); 221 }); 222 $(document).on('click', function(e) { 223 if ($(e.target).closest('.wrap__ul-01 li').length === 0) { 224 $('.wrap__ul-01 .add .sub_cat_box').slideUp(); 225 $('.wrap__ul-01 .add .toggle_mark').removeClass('active'); 226 } 227 }); 228 229 // PCç¨ãã³ãã¼ã¬ã¼ã¡ãã¥ã¼ 230 $('.header__user-menu, .header__user-img img.show__sp').on('click',function(){ 231 $(this).toggleClass('active'); 232 $('.header__user-min_menu_box').slideToggle(); 233 }); 234 $(document).on('click', function(e) { 235 if ($(e.target).closest('.header__user-min_menu_box, .header__user').length === 0) { 236 $('.header__user-menu').removeClass('active'); 237 $('.header__user-min_menu_box').slideUp(); 238 } 239 }); 240 241 242 // åå詳細ã¬ãã¥ã¼ä»¶æ°ã¯ãªãã¯ã§ç»é¢ç§»å 243 $('.ul__ratio .review_data').on('click',function(){ 244 let target = $('#reviewList').offset().top; 245 let head = $('.header').innerHeight(); 246 let calc = target - head; 247 $('body,html').animate({ 248 scrollTop: calc 249 }, 600); 250 return false; 251 }); 252 253 //使èªåå ¥å 254 const prefectureNameToCode = { 255 "åæµ·é": 1, 256 "鿣®ç": 2, 257 "岩æç": 3, 258 "å®®åç": 4, 259 "ç§ç°ç": 5, 260 "山形ç": 6, 261 "ç¦å³¶ç": 7, 262 "è¨åç": 8, 263 "æ æ¨ç": 9, 264 "群馬ç": 10, 265 "å¼çç": 11, 266 "åèç": 12, 267 "æ±äº¬é½": 13, 268 "ç¥å¥å·ç": 14, 269 "æ°æ½ç": 15, 270 "å¯å±±ç": 16, 271 "ç³å·ç": 17, 272 "ç¦äºç": 18, 273 "山梨ç": 19, 274 "é·éç": 20, 275 "å²éç": 21, 276 "é岡ç": 22, 277 "æç¥ç": 23, 278 "ä¸éç": 24, 279 "æ»è³ç": 25, 280 "京é½åº": 26, 281 "大éªåº": 27, 282 "å µåº«ç": 28, 283 "å¥è¯ç": 29, 284 "åæå±±ç": 30, 285 "é³¥åç": 31, 286 "å³¶æ ¹ç": 32, 287 "岡山ç": 33, 288 "åºå³¶ç": 34, 289 "å±±å£ç": 35, 290 "徳島ç": 36, 291 "é¦å·ç": 37, 292 "æåªç": 38, 293 "é«ç¥ç": 39, 294 "ç¦å²¡ç": 40, 295 "ä½è³ç": 41, 296 "é·å´ç": 42, 297 "çæ¬ç": 43, 298 "大åç": 44, 299 "å®®å´ç": 45, 300 "鹿å å³¶ç": 46, 301 "æ²ç¸ç": 47 302 }; 303 304 // éµä¾¿çªå·ãã£ã¼ã«ãã®ç£è¦ 305 /*$('.p-postal-code').on('change', function() { 306 // YubinBangoã«ããèªåä½æå ¥åãçµããã®ãå°ãå¾ ã¤ 307 setTimeout(function() { 308 const prefectureName = $('.p-region').val(); // YubinBangoã«ããã»ãããããé½éåºçåãåå¾ 309 const prefectureCode = prefectureNameToCode[prefectureName]; // é½éåºçåããã³ã¼ããåå¾ 310 if (prefectureCode) { 311 $('.p-region-id').val(prefectureCode); // é½éåºçã³ã¼ããã»ãã 312 } 313 }, 100); // YubinBangoãDOMãæ´æ°ããã®ãå¾ ã¤ããã®é å»¶ 314 }); 315 */ 316 317 // 追å ã³ã³ãã³ãã®ã¢ã³ã¼ãã£ãªã³è¨å® 318 function wrapElements(startElement, wrapperClass) { 319 let $startElement = $(startElement); 320 let startTag = $startElement.prop("tagName"); 321 let elementsToWrap = $startElement.nextUntil(startTag); 322 elementsToWrap.wrapAll(`<div class="${wrapperClass}"></div>`); 323 } 324 $('h2.accordion, h3.accordion, h4.accordion').each(function() { 325 wrapElements(this, 'accordion_wrapper'); 326 }); 327 $(document).on('click', 'h2.accordion, h3.accordion, h4.accordion',function(){ 328 $(this).toggleClass('active'); 329 $(this).next('.accordion_wrapper').slideToggle(); 330 }); 331 332 333}); 334 335//ãæ°ã«å ¥ãã¢ã¤ã³ã³ 336$(document).on('click','.like',function(event){ 337 event.preventDefault(); 338}); 339/*$(window).on('load resize' ,function (){ 340 let win = $(window).innerWidth(); 341 if (win <= 750) { 342 let foot = $('.footer__03');
343 let footH = foot.innerHeight(); 344 $('#footer').css('padding-bottom', `${footH}px`); 345 } else { 346 $('#footer').css('padding-bottom', `33px`); 347 } 348});*/ 349function myFunction(x) { 350 $('.nav').toggleClass("active"); 351 $('html').toggleClass("windowLock"); 352 $('#chatplusview').hide(); 353} 354$(document).on('click', '.chane-x, .nav__menu', function() { 355 myFunction(this); 356}); 357 358 359$(function() { 360 //ããå©ç¨ã¬ã¤ãç³»ã®ç®æ¬¡ã¹ã¯ãã¼ã« 361 function targetScroll(e) { 362 let target = $('h2[data-point="' + e + '"], h3[data-point="' + e + '"], h4[data-point="' + e + '"], .category_article_box[data-point="' + e + '"]'); 363 if (target.length) { 364 let header = $('.header').innerHeight(); 365 let targetOffset = target.offset().top - header; 366 $('html, body').animate({ 367 scrollTop: targetOffset 368 }, 600); 369 } 370 } 371 $('.ul__guide-03 span').on('click', function() { 372 let point = $(this).data('point'); 373 targetScroll(point); 374 }); 375 let hash = window.location.hash.substring(1); 376 if (hash) { 377 targetScroll(hash); 378 } 379 380 //ã製è¬ä¼ç¤¾ã¬ã¤ãã®ã¢ã«ãã¡ãããã¹ã¯ãã¼ã« 381 $('.ul__guide-02 ul a').on('click', function() { 382 let point = $(this).data('point'); 383 let target = $('.company__gp-box[data-point="' + point + '"]'); 384 if (target.length) { 385 let header = $('.header').innerHeight(); 386 let targetOffset = target.offset().top - header; 387 $('html, body').animate({ 388 scrollTop: targetOffset 389 }, 600); 390 } 391 }); 392}); 393 394 395//ãæ°ã«å ¥ã 396$(document).on('click', '.like', function(){ 397 const merchandiseId = $(this).data('merchandiseid'); 398 399 if(!merchandiseId){ 400 return; 401 } 402 403 if ($(this).hasClass("isFavorite") === false) { 404 $.ajax({ 405 type: "post", 406 url: "/favorites/add" + merchandiseId, 407 data: { 408 "merchandiseId" : merchandiseId, 409 "_formUuid" : "0a08571d-00d1-485e-b52c-8f2f8d811b4e" 410 }, 411 dataType : "json" 412 }).done(function(response){ 413 console.log(response); 414 }).fail(function(XMLHttpRequest, status, e){ 415 console.error("ãæ°ã«å ¥ãã«è¿½å ã®å¤±æ", e); 416 }); 417 418 $(this).addClass("isFavorite"); 419 } else { 420 $.ajax({ 421 type: "post", 422 url: "/favorites/del" + merchandiseId, 423 data: { 424 "merchandiseId" : merchandiseId, 425 "_formUuid" : "0a08571d-00d1-485e-b52c-8f2f8d811b4e" 426 }, 427 dataType : "json" 428 }).done(function(response){ 429 console.log(response); 430 }).fail(function(XMLHttpRequest, status, e){ 431 console.error("ãæ°ã«å ¥ãã«åé¤ã®å¤±æ", e); 432 }); 433 434 $(this).removeClass("isFavorite"); 435 } 436}); 437 438// headerã®é«ãèªåèª¿æ´ 439function headerHeight() { 440 let headerH = $('.header').innerHeight(); 441 $('header').css('height',headerH); 442 if ($('.pro_detail__price').length) { 443 $('.pro_detail__price').css('top',headerH); 444 } 445} 446function headerHeight2() { 447 let headerH = $('.header').innerHeight(); 448 let win = $(window).innerWidth(); 449 let searchH; 450 if (win <= 1000) { 451 searchH = $('.searchWordBox').innerHeight(); 452 } else { 453 searchH = 0; 454 } 455 $('header').css('height',headerH + searchH); 456 if ($('.pro_detail__price').length) { 457 $('.pro_detail__price').css('top',headerH + searchH); 458 } 459 $(window).on('scroll', function () { 460 $('.searchWordBox').hide(); 461 }); 462 headerHeight(); 463} 464$(window).on('load resize',function(){ 465 headerHeight(); 466}); 467$('.header__form.form_01 input').on('focus click',function(){ 468 requestAnimationFrame(() => { 469 requestAnimationFrame(() => { 470 headerHeight2(); 471 }); 472 }); 473}); 474 475 476
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.