PageSourceSearch

https://hishotelgroup.com/contact/js/contact.js?ver1.0

js hishotelgroup.com collected 2026-10-04 11:04:40 UTC 8,546 bytes, 280 lines download raw bytes

1// $(function () {
2//   const params = new URLSearchParams(window.location.search);
3//   let type = params.get("type");
4
5//   if (!type) return;
6
7//   // URLエンコードされた日本語をデコード
8//   type = decodeURIComponent(type);
9
10//   const $select = $("#contactSelect");
11//   if ($select.length === 0) return;
12
13//   // optionに存在するかチェック
14//   const exists = $select.find("option").filter(function () {
15//     return $(this).val() === type;
16//   }).length > 0;
17
18//   if (exists) {
19//     $select.val(type).trigger("change");
20//   }
21// });
22
23$(function () {
24  $("#file_select01").on("change", function () {
25    var file = this.files[0];
26    if (file != null) {
27      $("#file_name01").val(file.name);
28    }
29  });
30  $("#file_select02").on("change", function () {
31    var file = this.files[0];
32    if (file != null) {
33      $("#file_name02").val(file.name);
34    }
35  });
36});
37
38$(function () {
39  $("#file_name01").on("click", function () {
40    $("#file_select01").click();
41  });
42  $("#file_name02").on("click", function () {
43    $("#file_select02").click();
44  });
45});
46
47/*
48$(function () {
49  $('#privacyCheck').on('change', function () {
50    if ($(this).prop('checked')) {
51        $('#submitBtn02').removeClass('disable').find('button:submit').removeAttr('disabled');
52    } else {
53        $('#submitBtn02').addClass('disable').find('button:submit').attr('disabled', 'disabled');
54    }
55  });
56});
57*/
58
59$(function () {
60  $(".radio_tab input").on("click", function () {
61    if ($(this).prop("checked", true)) {
62      const active_tab = "#" + $(this).attr("data-id");
63      $(this).parents("td").find(".tab").hide();
64      $(active_tab).fadeIn();
65    }
66  });
67
68  $('input[name="rirekisho"]:radio').change(function () {
69    var v = $(this).val();
70    if (v == "郵送") {
71      $("#file_name01").removeClass("validate");
72      $("#file_name01").val("");
73      $("#file_select01").val("");
74    } else {
75      $("#file_name01").addClass("validate");
76    }
77  });
78
79  $('input[name="shokumu"]:radio').change(function () {
80    var v = $(this).val();
81    if (v == "郵送" || v == "なし") {
82      $("#file_name02").removeClass("validate");
83      $("#file_name02").val("");
84      $("#file_select02").val("");
85    } else {
86      $("#file_name02").addClass("validate");
87    }
88  });
89
90  $("#contactSelect").bind("change", function () {
91    var $val = $(this).val();
92    if ($val == "採用に関するお問い合わせ") {
93      $(".hotelCel").hide();
94      $(".recruitCel").fadeIn();
95      $(".developmentCel").hide();
96      $(".otherCel").hide();
97      $("textarea").removeClass("validate");
98      $(".birthday input").removeClass("validate");
99      $(".sex input").removeClass("validate");
100
101      if ($('input[name="rirekisho"]:checked').val() == "添付") {
102        $("#file_name01").addClass("validate");
103      } else if ($('input:radio[name="rirekisho"]:checked').val()) {
104        $('input:radio[name="rirekisho"]:checked').click();
105        $("#file_name01").removeClass("validate");
106      }
107
108      if ($('input[name="shokumu"]:checked').val() == "添付") {
109        $("#file_name02").addClass("validate");
110      } else if ($('input:radio[name="shokumu"]:checked').val()) {
111        $('input:radio[name="shokumu"]:checked').click();
112        $("#file_name02").removeClass("validate");
113      }
114
115    $(".company-required input").removeClass("validate");
116
117    } else if ($val == "各ホテルへのお問い合わせ(全ブランド、全ホテル選択)") {
118      $(".hotelCel").fadeIn();
119      $(".recruitCel").hide();
120      $(".developmentCel").hide();
121      $(".otherCel").fadeIn();
122      $("textarea").addClass("validate");
123      $(".birthday input").addClass("validate");
124      $(".sex input").addClass("validate");
125      $("#file_name01").removeClass("validate");
126      $("#file_name02").removeClass("validate");
127      $(".company-required input").removeClass("validate");
128    } else if ($val == "開発案件(土地・建物)のお問い合わせ") {
129      $(".hotelCel").hide();
130      $(".recruitCel").hide();
131      $(".developmentCel").fadeIn();
132      $(".otherCel").hide();
133      $(".otherCel:not(.type01)").show();
134      $("textarea").addClass("validate");
135      $(".birthday input").addClass("validate");
136      $(".sex input").addClass("validate");
137      $("#file_name01").removeClass("validate");
138      $("#file_name02").removeClass("validate");
139      $(".company-required input").addClass("validate");
140    } else {
141      $(".hotelCel").hide();
142      $(".recruitCel").hide();
143      $(".developmentCel").hide();
144      $(".otherCel").fadeIn();
145      $("textarea").addClass("validate");
146      $(".birthday input").addClass("validate");
147      $(".sex input").addClass("validate");
148      $("#file_name01").removeClass("validate");
149      $("#file_name02").removeClass("validate");
150      $(".company-required input").removeClass("validate");
151    }
152  });
153});
154
155$(function () {
156  $("#contactForm").on("submit", function () {
157    $("span.error").remove();
158
159    $(":text, .tel, .mail, textarea")
160      .filter(".validate")
161      .each(function () {
162        //必須項目のチェック
163        $(this)
164          .filter(".validate")
165          .each(function () {
166            if ($(this).val() == "") {
167              $(this)
168                .parent()
169                .prepend("<span class='error'>必須項目です</span>");
170            }
171          });
172
173        //メールアドレスのチェック
174        $(this)
175          .filter(".mail")
176          .each(function () {
177            if (
178              $(this).val() &&
179              !$(this)
180                .val()
181                .match(/.+@.+\..+/g)
182            ) {
183              $(this)
184                .parent()
185                .prepend(
186                  "<span class='error'>メールアドレスの形式が異なります</span>",
187                );
188            }
189          });
190
191        //メールアドレス確認のチェック
192        $(this)
193          .filter(".mail_check")
194          .each(function () {
195            if (
196              $(this).val() &&
197              $(this).val() !=
198                $(
199                  "input[name=" +
200                    $(this)
201                      .attr("name")
202                      .replace(/^(.+)_check$/, "$1") +
203                    "]",
204                ).val()
205            ) {
206              $(this)
207                .parent()
208                .prepend(
209                  "<span class='error'>メールアドレスと内容が異なります</span>",
210                );
211            }
212          });
213      });
214
215    if ($("#contactSelect").val() == "採用に関するお問い合わせ") {
216      //チェックボックスのチェック
217      $(".birthday").each(function () {
218        if ($(".num", this).val() == "") {
219          $(this).before("<span class='error'>必須項目です</span>");
220        }
221      });
222    }
223
224    if ($("#contactSelect").val() == "開発案件(土地・建物)のお問い合わせ") {
225      //チェックボックスのチェック
226      $(".land-size").each(function () {
227        if ($(".num", this).val() == "") {
228          $(this).before("<span class='error'>必須項目です</span>");
229        }
230      });
231    }
232
233    //チェックボックスのチェック
234    $(":checkbox").each(function () {
235      $(this)
236        .filter(".validate")
237        .each(function () {
238          if (
239            $("input[name=" + $(this).attr("name") + "]:checked").size() == 0
240          ) {
241            $(this)
242              .parent()
243              .after("<span class='error'>選択してください</span>");
244          }
245        });
246    });
247
248    /*		 
249        //ラジオボタンのチェック
250        $(":radio").filter(".validate").each(function(){
251            $(this).filter(".validate").each(function(){
252                if($("input[name="+$(this).attr("name")+"]:checked").size() == 0){
253                    $(this).parent().before("<span class='error'>選択してください</span>")
254                }
255            })
256        })
257*/
258
259    //エラーの際の処理
260    if ($("span.error").size() > 0) {
261      $("html,body").animate(
262        { scrollTop: $("span.error:first").offset().top - 100 },
263        "slow",
264      );
265      $("span.error").parent().addClass("error");
266      return false;
267    }
268  });
269
270  $(".validate").on("blur", function () {
271    if ($(this).val() !== "") {
272      $(this).prev().remove("span.error");
273    }
274  });
275  $(".birthday .validate").on("blur", function () {
276    if ($(this).val() !== "") {
277      $(this).parent().prev().remove("span.error");
278    }
279  });
280});

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.