PageSourceSearch

https://www.okamoto-dent.net/js/common.js

js okamoto-dent.net collected 2026-10-05 09:33:58 UTC 3,220 bytes, 107 lines download raw bytes

1// anchor in page
2$(window).bind('load', function() {
3    "use strict";
4    $(function() {
5        $('a[href^="#"]').click(function() {
6            if ($($(this).attr('href')).length) {
7                var p = $($(this).attr('href')).offset();
8                if ($(window).width() > 750) {
9                    $('html,body').animate({ scrollTop: p.top - 180 }, 400);
10                } else {
11                    $('html,body').animate({ scrollTop: p.top - 100 }, 400);
12                }
13            }
14            return false;
15        });
16    });
17});
18
19// anchor top page #
20$(window).bind('load', function() {
21    "use strict";
22    var hash = location.hash;
23    if (hash) {
24        var p1 = $(hash).offset();
25        if ($(window).width() > 750) {
26            $('html,body').animate({ scrollTop: p1.top - 180 }, 400);
27        } else {
28            $('html,body').animate({ scrollTop: p1.top - 100 }, 400);
29        }
30    }
31});
32
33$(document).ready(function() {
34    "use strict";
35    $(window).scroll(function() {
36        if ($(this).scrollTop() > 0) {
37            $('#btn_top').fadeIn(300);
38            $('header').addClass('active');
39        } else {
40            $('#btn_top').fadeOut(300);
41            $('header').removeClass('active');
42        }
43    });
44
45    if($(window).width() < 751){
46        $(window).scroll(function() {
47            if ($(this).scrollTop() > 0) {
48                $('.fct_side').addClass('active');
49            } else {
50                $('.fct_side').removeClass('active');
51            }
52        });
53    }
54
55    $('#btn_top').click(function() {
56        $('body,html').animate({ scrollTop: 0 }, 800);
57    });
58
59    if( $('.faq_list').length) {
60        $('.faq_list dd').slideUp();
61        $('.faq_list dt').on('click', function () {
62            $(this).toggleClass('active');
63            $(this).next('dd').slideToggle();
64        });
65    }
66    if( $('.tab_outer').length) {
67        $('ul.tabs li').click(function(){
68            var tab_id = $(this).attr('data-tab');
69            $('ul.tabs li').removeClass('current');
70            $('.tab-contents').removeClass('current');
71            $(this).addClass('current');
72            $("#"+tab_id).addClass('current');
73        });
74    }
75
76    if ($(window).width() < 751) {
77        $('li.sub ul').stop().slideUp();
78
79        $(".btn_side").click(function() {
80            $(this).toggleClass('open');
81            $("nav, .fct_side .tel a, body").toggleClass("active");
82            $(".sub_btn").removeClass("active");
83            $('li.sub ul').stop().slideUp();
84            return false;
85        });
86
87        $(".sub_btn").click(function() {
88            $(this).toggleClass("active");
89            $(this).next("ul").stop().slideToggle("500");
90        });
91
92        $(".btn_close_menu").click(function() {
93            $("nav").removeClass("active");
94            $(".btn_side").removeClass("open");
95            $("li.sub ul").stop().slideUp("500");
96            $('.sub_btn').removeClass("active");
97        });
98
99        $(".sub ul li a").click(function() {
100            $(".btn_side").removeClass("open");
101            $("nav").removeClass("active");
102            $(".sub_btn").removeClass("active");
103            $('li.sub ul').stop().slideUp();
104        });
105    }
106});
107

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.