1$(function() { 2 var 3 windowWidth = $(window).width(), 4 pcBreakPoint = 1000; 5 6 $('#js-hamburger-btn').on('click', function() { 7 $('#header-menu').stop().fadeToggle(); 8 $('body').toggleClass('open'); 9 }); 10 11 $('#hamburger-close').on('click', function() { 12 $('#header-menu').stop().fadeOut(); 13 $('body').removeClass('open'); 14 }); 15 16 $('#header-nav-category .has-sub-category').on('click', function(e) { 17 if (windowWidth < pcBreakPoint) { 18 e.preventDefault(); 19 $(this).next().stop().slideToggle(); 20 $(this).toggleClass('open'); 21 } 22 }); 23 24 $('#header-member').on('click', function() { 25 $('#header-member-list').stop().slideToggle(); 26 $(this).toggleClass('open'); 27 }); 28 29 $('#header-search').on('keypress', function (e) { 30 if (e.which === 13) { 31 $('#header-search-link')[0].click(); 32 } 33 }); 34 35 // ã«ã¬ã³ãã¼ç¹å®æ¥ã®è¨å® 36 $('.day-list').each(function() { 37 var month = $(this).attr('data-month'); 38 var day = $(this).attr('data-day'); 39 var color = $(this).attr('data-color'); 40
41 $('.makeshop-calendar' + month +' .day' + day).css({ 42 'background-color': color, 43 'color': '#fff', 44 'font-weight': 'bold' 45 }); 46 }); 47 48 // if ($('#side-nav').is(':visible')) { 49 // var sideNavHeight = $('#side-nav').height(); 50 // $('main').css('min-height', $('main').height() < sideNavHeight ? sideNavHeight : 0); 51 // } else { 52 // $('main').css('min-height', 0); 53 // } 54}); 55$(function() { 56 var 57 $goodsImg = $('#goods-img'), 58 $favoriteBtn = $('#goods-cart-favorite'), 59 cartBtnTop = $('#goods-cart-btn').offset().top, 60 windowWidth = $(window).width(), 61 windowBreakPoint = 1000; 62 63 $(window).on('load', function() { 64 setGoodsImg(); 65 }); 66 67 function setGoodsImg() { 68 if ($goodsImg.find('li').length > 1) { 69 $('#goods-thumbnail li').each(function(index, element) { 70 $(element).find('a').attr('data-slide-index', index); 71 }); 72 var goodsSlider = $goodsImg.bxSlider({ 73 pagerCustom: '#goods-thumbnail', 74 onSliderLoad: function (currentIndex) { 75 $('#goods-img-count-current').text(currentIndex + 1); 76 }, 77 onSlideBefore: function ($slideElement, oldIndex, newIndex) { 78 $('#goods-img-count-current').text(newIndex + 1); 79 } 80 }); 81 $('#goods-img-count-total').text(goodsSlider.getSlideCount()); 82 } 83 } 84 85 $('#goods-quantity-up').on('click', function() { 86 changeQuantity($('#goods-quantity-input'), 'up', $('#goods-quantity-down')); 87 }); 88 89 $('#goods-quantity-down').on('click', function() { 90 changeQuantity($('#goods-quantity-input'), 'down', $('#goods-quantity-down')); 91 }); 92 93 function changeQuantity($target, mode, $btn) { 94 var 95 oldQuantity = parseInt($target.val(), 10), 96 newQuantity = 0; 97 98 switch (mode) { 99 case 'up': 100 newQuantity = oldQuantity + 1; 101 break; 102 case 'down': 103 newQuantity = oldQuantity - 1; 104 break; 105 } 106 107 if (windowBreakPoint > windowWidth) { 108 if (newQuantity <= 1) { 109 $btn.hide(); 110 } else { 111 $btn.show(); 112 } 113 } 114 115 if (newQuantity >= 1) { 116 $target.val(newQuantity); 117 } 118 } 119 120 $favoriteBtn.find('a').on('click', function() { 121 $favoriteBtn.addClass('add-favorite'); 122 }); 123 124 $(window).bind('scroll', function() { 125 if (windowWidth >= windowBreakPoint) { 126 if ($(window).scrollTop() > cartBtnTop) {
127 $('#goods-cart-btn-fix').fadeIn(); 128 } else { 129 $('#goods-cart-btn-fix').fadeOut(); 130 } 131 } 132 }); 133 134 $('img.option-image').on('click', function() { 135 showOptionImage($(this).attr('data-option-image')); 136 }); 137}); 138 139function MakeShop_afterItemOptionChange(data) { 140 if (data.isSoldout) { 141 $('.instock').removeClass('on').addClass('off'); 142 $('.outstock').removeClass('off').addClass('on'); 143 } else { 144 $('.instock').removeClass('off').addClass('on'); 145 $('.outstock').removeClass('on').addClass('off'); 146 } 147 148 showOptionImage(data.imageL); 149} 150function MakeShop_afterCartEntry(data) { 151 if (data.result) { 152 $('.icon-cart-num').text(data.totalQuantity); 153 data.method.modal('ã«ã¼ãã«è¿½å ããã¾ãã'); 154 } else { 155 data.method.modal(data.error.message); 156 } 157 return false; 158} 159 160function showOptionImage(url) { 161 if (url == '') { 162 return; 163 } 164 165 $('ul.goods-thumbnail img[src="' + url + '"]').trigger('click'); 166}
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.