PageSourceSearch

https://yosobei.com/wp/wp-content/themes/yosobei2021/js/form.js?20120112166666666666622

js yosobei.com collected 2026-10-06 08:50:33 UTC 4,761 bytes, 99 lines download raw bytes

1    $(function () {
2        // 入力内容取得用 変数
3        var val;
4        // id取得用 変数
5        var id;
6        // ラジオボタン値取得用 変数
7        var radio;
8        // チェックボックス値取得用 変数
9        var check;
10        // input要素のtype属性値取得用(ラジオボタンであるかどうか判別のため)
11        var type;
12        // ラジオボタン初期値の取得 以下の記述で全てのラジオボタンの初期値を取得
13        $("[type='radio']:checked").each(function (index) {
14            // ラジオボタン値取得
15            radio = $(this).val();
16            // ラジオボタンの祖先要素からid名を取得
17            id = $(this).parents("[id]").attr("id");
18            // 取得したid名を確認用のclass名末尾に付与して、確認画面の値を指定
19            $(".confirm_" + id).text(radio);
20        });
21        //入力欄の内容が変わった際の処理 入力した内容が確認画面へ登録される
22        $(".input_area input,.input_area select,.input_area textarea").change(function () {
23            //入力内容取得
24            val = $(this).val();
25            //type属性の取得
26            type = $(this).attr("type");
27            //type属性がラジオボタンだった場合の処理
28            if (type == "radio") {
29                // ラジオボタン値取得
30                radio = $(this).val();
31                // ラジオボタンの祖先要素からid名を取得
32                id = $(this).parents("[id]").attr("id");
33                // 取得したid名を確認用のclass名末尾に付与して、確認画面の値を指定
34                $(".confirm_" + id).text(radio);
35            }//type属性がチェックボックスだった場合の処理
36            else if (type == "checkbox") {
37                // チェックボックス値取得
38                check = $(this).val();
39                // ラジオボタンの祖先要素からid名を取得
40                id = $(this).parents("[id]").attr("id");
41                // 取得したid名を確認用のclass名末尾に付与して、確認画面の値を指定
42                $(".confirm_" + id).append(check + " / ");
43            }//type属性がラジオボタンではなかった場合の処理
44            else {
45                // 入力欄のid名を取得
46                id = $(this).attr("id");
47                // 取得したid名を確認用のclass名末尾に付与して、確認画面の値を指定
48                $(".confirm_" + id).text(val);
49            }
50        })
51        //確認ボタンを押した際の処理 入力画面を非表示・確認画面を表示
52        $(".confirm_button").click(function () {
53            $(".input_area").hide();
54            $(".confirm_area").show();
55                $('.soushin_block').removeClass('soushin_disabled');
56            $(window).scrollTop($('#contact-form-start').offset().top);
57        })
58        //戻るボタンを押した際の処理 入力画面を表示・確認画面を非表示
59        $(".back_button").click(function () {
60            $(".input_area").show();
61            $(".confirm_area").hide();
62            $(window).scrollTop($('#contact-form-start').offset().top);
63        })
64        //送信ボタンを押した際の処理 サンクス(完了)画面を表示・確認画面を非表示
65        $("[type='submit']").click(function () {
66            $(".thanks_area").fadeIn(2000);
67            $(".confirm_area").hide();
68            $(window).scrollTop($('#contact-form-start').offset().top);
69        })
70
71        //必須項目チェック用 定数の作成
72        const target = '[aria-required="true"]';
73
74        //必須項目の内容が変わった際の処理
75        $(target).on('keydown keyup keypress change', function () {
76
77            //判定用フラグ
78            let flag = true;
79
80            //必須項目をループで1つずつ確認
81            $(target).each(function (e) {
82                if ($(target).eq(e).val() === "") {
83                    flag = false;
84                }
85            });
86
87            //フラグがtrueなら確認ボタンを有効。falseなら無効にする
88            if (flag) {
89                //必須項目すべて入力済みであれば有効にする
90                $('.confirm_button').removeAttr("disabled");
91                $('.soushin_block').removeClass('soushin_disabled');
92            }
93            else {
94                //未入力など漏れがある場合は無効にする
95                $('.confirm_button').attr("disabled","");
96                $('.soushin_block').addClass('soushin_disabled');
97            }
98        });
99    })

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.