PageSourceSearch

https://www.fukuoka-umaka-buy.com/view/asset/user-51-1-3-08fbc010327b8cba5c66dec25c56cff6.js

js fukuoka-umaka-buy.com collected 2026-10-05 02:13:02 UTC 5,128 bytes, 167 lines download raw bytes

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
56$(function() {
57    var
58        $goodsImg           = $('#goods-img'),
59        $favoriteBtn        = $('#goods-cart-favorite'),
60        cartBtnTop          = $('#goods-cart-btn').offset().top,
61        windowWidth         = $(window).width(),
62        windowBreakPoint    = 1000;
63
64    $(window).on('load', function() {
65        setGoodsImg();
66    });
67
68    function setGoodsImg() {
69        if ($goodsImg.find('li').length > 1) {
70            $('#goods-thumbnail li').each(function(index, element) {
71                $(element).find('a').attr('data-slide-index', index);
72            });
73            var goodsSlider = $goodsImg.bxSlider({
74                pagerCustom: '#goods-thumbnail',
75                onSliderLoad: function (currentIndex) {
76                    $('#goods-img-count-current').text(currentIndex + 1);
77                },
78                onSlideBefore: function ($slideElement, oldIndex, newIndex) {
79                    $('#goods-img-count-current').text(newIndex + 1);
80                }
81            });
82            $('#goods-img-count-total').text(goodsSlider.getSlideCount());
83        }
84    }
85
86    $('#goods-quantity-up').on('click', function() {
87        changeQuantity($('#goods-quantity-input'), 'up', $('#goods-quantity-down'));
88    });
89
90    $('#goods-quantity-down').on('click', function() {
91        changeQuantity($('#goods-quantity-input'), 'down', $('#goods-quantity-down'));
92    });
93
94    function changeQuantity($target, mode, $btn) {
95        var
96            oldQuantity = parseInt($target.val(), 10),
97            newQuantity = 0;
98
99        switch (mode) {
100            case 'up':
101                newQuantity = oldQuantity + 1;
102                break;
103            case 'down':
104                newQuantity = oldQuantity - 1;
105                break;
106        }
107
108        if (windowBreakPoint > windowWidth) {
109            if (newQuantity <= 1) {
110                $btn.hide();
111            } else {
112                $btn.show();
113            }
114        }
115
116        if (newQuantity >= 1) {
117            $target.val(newQuantity);
118        }
119    }
120
121    $favoriteBtn.find('a').on('click', function() {
122        $favoriteBtn.addClass('add-favorite');
123    });
124
125    $(window).on('scroll', function() {
126        if (windowWidth >= windowBreakPoint) {
127            if ($(window).scrollTop() > cartBtnTop) {
128                $('#goods-cart-btn-fix').fadeIn();
129            } else {
130                $('#goods-cart-btn-fix').fadeOut();
131            }
132        }
133    });
134
135    $('img.option-image').on('click', function() {
136        showOptionImage($(this).attr('data-option-image'));
137    });
138});
139
140function MakeShop_afterItemOptionChange(data) {
141    if (data.isSoldout) {
142        $('.instock').removeClass('on').addClass('off');
143        $('.outstock').removeClass('off').addClass('on');
144    } else {
145        $('.instock').removeClass('off').addClass('on');
146        $('.outstock').removeClass('on').addClass('off');
147    }
148
149    showOptionImage(data.imageL);
150}
151function MakeShop_afterCartEntry(data) {
152    if (data.result) {
153        $('.icon-cart-num').text(data.totalQuantity);
154        data.method.modal('カートに追加されました');
155    } else {
156        data.method.modal(data.error.message);
157    }
158    return false;
159}
160
161function showOptionImage(url) {
162    if (url == '') {
163        return;
164    }
165
166    $('ul.goods-thumbnail img[src="' + url + '"]').trigger('click');
167}

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.