PageSourceSearch

https://chari-angels.com/wp-content/themes/chariangels_wp/assets/js/js-action.js

js chari-angels.com collected 2026-09-30 22:03:45 UTC 3,094 bytes, 114 lines download raw bytes

1// ハンバーガーメニュー
2$(function() {
3  $('.tab').on('click', function() {
4    $('.tab, .panel').removeClass('active');
5  
6    $(this).addClass('active');
7     
8    var index = $('.tab').index(this);
9    $('.panel').eq(index).addClass('active');
10  });
11});
12
13$(function () {
14  const height = $("header").height();
15});
16// ページ内スクロール
17$(function () {
18  // ヘッダーの高さ取得
19  const headerHeight = $("header").height();
20  $('a[href^="#"]').click(function () {
21    const speed = 600;
22    let href = $(this).attr("href");
23    let target = $(href == "#" || href == "" ? "html" : href);
24    // ヘッダーの高さ分下げる
25    let position = target.offset().top - 300;
26    $("body,html").animate({ scrollTop: position }, speed, "swing");
27    return false;
28  });
29});
30
31$(function(){
32  $('.faq_list dt').click(function(){
33    $(this).next('dd').slideToggle();
34    $(this).toggleClass("toggle");
35  });
36  if (window.matchMedia("(max-width: 768px)").matches) {
37  $('.singlesearch .sub_ttl').click(function(){
38    $(this).next('.spcontent').slideToggle();
39    $(this).toggleClass("toggle");
40  });
41  }
42});
43
44
45$(function(){
46    var sp_nav = $('.toggle_menu_wrap');
47    var nav =$('.toggle_nav');
48    var main_cover = $('.toggle_menu_wrap');
49    sp_nav.removeClass('ac');
50    sp_nav.on('click',function(){
51        nav.slideToggle(500);
52        $(".toggle_menu").toggleClass('ac');
53        main_cover.toggleClass('ac');
54        nav.toggleClass('ac');
55
56  });
57  $('#menu a[href]').on('click', function(event) {
58    $('.toggle_nav').trigger('click');
59  });
60
61
62function FixedAnime() {
63  var headerH = $('header').outerHeight(true);
64  var scroll = $(window).scrollTop();
65  if (scroll >= headerH){//headerの高さ以上になったら
66      $('header').addClass('fixed');//fixedというクラス名を付与
67    }else{//それ以外は
68      $('header').removeClass('fixed');//fixedというクラス名を除去
69    }
70}
71$(window).scroll(function () {
72  FixedAnime();/* スクロール途中からヘッダーを出現させる関数を呼ぶ*/
73});
74
75});
76
77
78$(document).ready(function() {
79    // まず、ボタンを隠しておきます。
80    $('.pagetop').hide();
81
82    // ウィンドウをスクロールするたびに、以下のコードを実行します。
83    $(window).scroll(function() {
84        // 途中(たとえば画面の高さの半分)までスクロールした時点で、ボタンを表示します。
85        if ($(this).scrollTop() > $(this).height() / 2) {
86            $('.pagetop').fadeIn();
87        } else {
88            // そうでない場合は、ボタンを非表示にします。
89            $('.pagetop').fadeOut();
90        }
91    });
92
93    // ページトップへ戻るボタンをクリックしたときの動作を設定します。
94    $('.pagetop').click(function() {
95        $('body, html').animate({
96            scrollTop: 0
97        }, 800);
98        return false;
99    });
100});
101
102
103
104$(document).ready(function() {
105  $('.tenkai').click(function() {
106    $(this).find('ul').slideToggle();
107    $(this).toggleClass('active');
108  });
109});
110
111
112
113
114

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.