PageSourceSearch

https://peraichi.com/js/pricing.js?1790224590

js peraichi.com collected 2026-09-24 08:24:40 UTC 3,487 bytes, 85 lines download raw bytes

1$(function () {
2    // 他ページからid指定で飛んでくる可能性があるのでそれのワークアラウンド;
3    (function () {
4        var headerHeight, targetPos;
5        // url#~ がDOMのidに見つからなかったらskip
6        if ($(location.hash).length === 0) return false;
7        // fixedヘッダーの高さ分を踏まえた位置に自動スクロール
8        headerHeight = $('#js-header-sticky').outerHeight();
9        targetPos = $(location.hash).offset().top;
10        setTimeout(function () {
11            window.scrollTo(0, targetPos - headerHeight);
12        }, 10);
13        return true;
14    })();
15
16    // モバイル画面サイズでの料金表項目toggle
17    $('.js-plan-table-row-toggle').on('click', function () {
18        var $this = $(this);
19        $this.toggleClass('open');
20        $this.parent('th').siblings('td').toggleClass('open');
21    });
22
23    // faq see more
24    $('[data-faq-more]').on('click', function () {
25        var $this = $(this),
26            targetSelector = $this.data('faq-more');
27        $this.addClass('open');
28        $this.siblings(targetSelector).addClass('open');
29    });
30
31    // mixpanel tracking
32    $(document).on('click', '.mp_price_btn', function () {
33        var $this = $(this);
34        mixpanel.track($this.data('mixpanel-type'));
35    });
36
37    /**
38     * よくある質問toggle
39     */
40    $('.js-pricing-faq-accordion-toggle').on('click', function () {
41        var $this = $(this);
42        $this.toggleClass('is-open');
43        $this.children('.js-pricing-faq-accordion-toggle-icon').toggleClass('is-open');
44        $this.siblings('.js-pricing-faq-item').toggleClass('is-open');
45    });
46
47    $('.js-pricing-question-accordion-toggle').on('click', function () {
48        var $this = $(this);
49        $this.find('.js-pricing-question-accordion-toggle-icon').toggleClass('is-open');
50        $this.parent().siblings('.js-pricing-question-item').toggleClass('is-open');
51    });
52
53    /**
54     * 未ログインユーザー向け: 予約機能以降のアコーディオンを閉じる
55     * For non-logged users: Close all accordions from "予約機能" onwards
56     */
57    if ($('.js-pricing-comparison-not-logged').length > 0) {
58        // 各wrapper(PC/Mobile)ごとに処理
59        $('.js-pricing-comparison-not-logged').each(function () {
60            var $wrapper = $(this);
61            // 最初のアコーディオン(ページ作成機能)以外を閉じる
62            $wrapper.find('.js-pricing-question-accordion-toggle')
63                .not(':first')
64                .each(function () {
65                    var $this = $(this);
66                    // アイコンから is-open を削除
67                    $this.find('.js-pricing-question-accordion-toggle-icon').removeClass('is-open');
68                    // 対応する tbody から is-open を削除
69                    $this.parent().siblings('.js-pricing-question-item').removeClass('is-open');
70                });
71        });
72    }
73
74    $('.p-pricing-plan-item').on('click', function () {
75        var $this = $(this);
76        const plan = $this.attr('data-plan');
77        $('.p-pricing-plan-item').removeClass('active-plan');
78        $this.addClass('active-plan');
79        $('.p-pricing-plan-item-selected').removeClass('active-plan');
80        $(`.${plan}`).addClass('active-plan');
81    });
82
83    // 料金表では背景色を常に白(#fff)にするため、クラス削除
84    $('body').removeClass('setBgColor');
85});

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.