PageSourceSearch

https://www.nomura-cln-namba.jp/wp-content/themes/child/script/common.js

js nomura-cln-namba.jp collected 2026-10-05 11:16:03 UTC 4,349 bytes, 131 lines download raw bytes

1// タブレットビューポート
2if ((navigator.userAgent.indexOf('iPhone') > 0) || navigator.userAgent.indexOf('iPod') > 0 || navigator.userAgent.indexOf('Android') > 0) {
3    document.head.insertAdjacentHTML('beforeend', '<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">');
4} else {
5    document.head.insertAdjacentHTML('beforeend', '<meta name="viewport" content="width=1250">');
6}
7
8$(function () {
9
10    wow = new WOW({
11        boxClass: 'wow', // default
12        animateClass: 'animated', // default
13        offset: 0, // default
14        mobile: true, // default
15        live: true // default
16    });
17    wow.init();
18
19    // スムーズスクロール
20    const headerClassName = $(window).width() > 750 ? '#main_header' : 'header#sp_header';
21    let headerHeight = $(`${headerClassName}`).outerHeight() + 50;
22
23    $('[href^="#"]').click(function () {
24        const speed = 400;
25        const href = $(this).attr("href");
26        const target = $(href == "#" || href == "" ? 'html' : href);
27        const position = target.offset().top - headerHeight;
28        $('body,html').animate({ scrollTop: position }, speed, 'swing');
29        return false;
30    });
31
32    // 別ページ間でのアンカーリンク処理
33    $(window).on('load', function () {
34        const url = $(location).attr('href');
35        if (url.indexOf("#") != -1) {
36            const anchor = url.split("#"),
37                target = $('#' + anchor[anchor.length - 1]),
38                position = Math.floor(target.offset().top) - headerHeight;
39            $("html, body").animate({ scrollTop: position }, 10);
40        };
41    });
42
43    //TOPへ戻るボタン顕現
44
45    $(window).on('scroll', function () {
46        if ($(window).scrollTop() > 100) {
47            $('.pc_back_top').addClass("active");
48        } else {
49            $('.pc_back_top').removeClass("active");
50        }
51    });
52
53    $(window).on('scroll', function () {
54        if ($(window).scrollTop() > 100) {
55            $('.sp_follow_bar').addClass("active");
56        } else {
57            $('.sp_follow_bar').removeClass("active");
58        }
59    });
60
61    // 性病即日診断ページダブ切り替え
62    $('.tabs a[href^="#panel"]').click(function () {
63        $('.tabs .panel').hide();
64        $('.tabs a').removeClass('active');
65        $(this).toggleClass('active');
66        $(this.hash).fadeIn();
67        return false;
68    });
69
70    // $('.tabs a[href^="#panel"]:eq(0)').trigger('click');
71
72    // 性病即日診断ページダブ切り替え(ページ遷移対応)
73    //リンクからハッシュを取得
74    var hash = location.hash;
75    hash = (hash.match(/^#tab\d+$/) || [])[0];
76
77    //リンクにハッシュが入っていればtabnameに格納
78    if ($(hash).length) {
79        var tabname = hash.slice(1);
80    } else {
81        var tabname = "tab1";
82    }
83
84    //コンテンツ非表示&amp;タブを非アクティブ
85    $('.tabs .panel').hide();
86    $('.tabs a').removeClass('active');
87
88    //何番目のタブかを格納
89    var tabno = $('.tabs li#' + tabname).index();
90
91    //コンテンツ表示
92    $('.tabs .panel').eq(tabno).fadeIn();
93
94    //タブのアクティブ化
95    $('.tabs a').eq(tabno).addClass('active');
96
97    // PCハンバーガーメニュー制御
98    $('.hd_contact_area .menu_btn').click(function () {
99        $(this).toggleClass('active');
100
101        if ($(this).hasClass('active')) {
102            $('.hamburger_menu_cont').addClass('active');
103        } else {
104            $('.hamburger_menu_cont').removeClass('active');
105        }
106    });
107
108});
109
110$(function () {
111    const headerName = $(window).width() > 750 ? $('#main_header') : $('#sp_header');
112    let headerHeight = headerName.outerHeight();
113    var urlHash = location.hash;
114    if (urlHash) {
115        $('body,html').stop().scrollTop(0);
116        setTimeout(function () {
117            var target = $(urlHash);
118            var position = target.offset().top - headerHeight;
119            $('body,html').stop().animate({ scrollTop: position }, 500);
120        }, 100);
121    }
122    $('a[href^="#"]').click(function () {
123        var href = $(this).attr("href");
124        var target = $(href);
125        var position = target.offset().top - headerHeight;
126        $('body,html').stop().animate({ scrollTop: position }, 500);
127        return false;
128    });
129});
130
131

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.