PageSourceSearch

https://secure.kikkoman.co.jp/viewIncludeFiles/js/common.js?20261001191615

js kikkoman.co.jp collected 2026-10-01 10:16:23 UTC 1,715 bytes, 52 lines download raw bytes

1/* 2022年追加 */
2/* ページTopへ戻るボタン設置 */
3$(function() {
4
5    /*
6     * スクロールが発生する場合のみ、ページTopへ戻るボタンを表示する
7     * マイページPCは以外は、bodyでコンテンツ高さを取得する
8     * マイページPCはスクロールが発生する箇所でコンテンツ高さを取得する
9     */
10
11    let bodyId = $('body').attr('id');
12    let mypagePcFlg;
13
14    $(window).on('load resize', function() {
15
16        // マイページPCでフラグを立てる
17        if (bodyId === 'mypage_body') {
18            let mypageResponsiveWidth = 768;
19            if ($(window).width() > mypageResponsiveWidth) {
20                mypagePcFlg = true;
21            } else {
22                mypagePcFlg = false;
23            }
24        } else {
25            mypagePcFlg = false;
26        }
27
28        // heightを取得
29        let windowHeight = $(window).height();
30        let contentHeight;
31        if (mypagePcFlg === true) {
32            contentHeight = $('.mypage_content').innerHeight();
33        } else {
34            contentHeight = $('body').height();
35        }
36
37        // ページTopへ戻るボタンの表示処理
38        // (コンテンツ高さ+headerHeight)が画面高さより大きければ表示
39        let headerHeight = $('header').innerHeight();
40        if (windowHeight >= contentHeight + headerHeight) {
41            $('.pagetop').hide();
42        } else {
43            $('.pagetop').show();
44        }
45    });
46
47    // ページTopへ戻る処理
48    $('.pagetop').on('click', function() {
49        $('html, body').animate({scrollTop : 0}, 400);
50        return false;
51    });
52});

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.