PageSourceSearch

https://stress07.com/templates/js/header_swich_box.js?210513

js stress07.com collected 2026-10-04 01:33:49 UTC 2,602 bytes, 81 lines download raw bytes

1
2$(function() {
3
4    //モーダルを開いた時のスクロール位置を保持
5    var scrollPosition;
6    //iOS(iPadOSを含む)かどうかのUA判定
7    var ua = window.navigator.userAgent.toLowerCase();
8    var isiOS = ua.indexOf('iphone') > -1 || ua.indexOf('ipad') > -1 || ua.indexOf('macintosh') > -1 && 'ontouchend' in document;
9
10    //bodyのスクロール固定
11    let bodyFixedOn = function() {
12        if(isiOS){
13            // iOSの場合
14            scrollPosition = $(window).scrollTop();
15            $('#contact-title').click;
16        }else {
17            // それ以外
18            $('#contact-title').click;
19        }
20    }
21
22    //bodyのスクロール固定を解除
23    let bodyFixedOff = function() {
24        if(isiOS){
25            // iOSの場合
26            $('#contact-title').click;
27            $(window).scrollTop(scrollPosition);
28        }else {
29            // それ以外
30            $('#contact-title').click;
31        }
32    }
33
34    $('#search-btn').click(function() {
35        $('#searchArea').slideToggle(400);
36    });
37
38    //お見積りbtn
39    $('#open-estimate').click(function() {
40        if ($('#header-estimate-list-box').css('display') == 'block') {
41            bodyFixedOff();
42            $('#header-estimate-list-box').slideToggle(300);
43        } else {
44            bodyFixedOn();
45            $('#header-estimate-list-box').slideToggle(300);
46        }
47    });
48
49    $('#estimate-title').click(function() {
50        $('#header-estimate-list-box').slideUp(300);
51    });
52
53    $(document).click(function(event) {
54        if(!$(event.target).closest('#header-estimate-list-box').length &&
55           !$(event.target).closest('#open-estimate').length) {
56            $('#header-estimate-list-box').slideUp(300);
57        }
58    });
59    //お問い合わせbtn
60    $('#open-contact').click(function() {
61        if ($('#header-contact-list-box').css('display') == 'block') {
62            bodyFixedOff();
63            $('#header-contact-list-box').slideToggle(300);
64        } else {
65            bodyFixedOn();
66            $('#header-contact-list-box').slideToggle(300);
67        }
68    });
69
70    $('#contact-title').click(function() {
71        $('#header-contact-list-box').slideUp(300);
72    });
73    //指定場所以外の書き方
74    $(document).click(function(event) {
75        if(!$(event.target).closest('#header-contact-list-box').length &&
76           !$(event.target).closest('#open-contact').length) {
77            $('#header-contact-list-box').slideUp(300);
78        }
79    });
80
81});

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.