PageSourceSearch

https://sky-medical.net/js/smoothscroll.js

js sky-medical.net collected 2026-10-05 11:02:39 UTC 1,772 bytes, 61 lines download raw bytes

1 if ( window.matchMedia( 'screen and (max-width:767.98px)' ).matches ) {
2//sp
3      
4$(function(){
5//const headerHeightSp = $('div.header').outerHeight();
6const headerHeightSp = 10;
7const urlHash = location.hash;
8          
9        //ページ外リンクスクロール
10      if(urlHash) {
11      
12        $('body,html').stop().scrollTop(0);
13    setTimeout(function(){
14        const target = $(urlHash);
15        const position = target.offset().top - headerHeightSp;
16        $('body,html').stop().animate({scrollTop:position}, 500);}, 100);
17     
18      }
19      
20        //ページ内スクロール
21$('.smooth a[href^="#"],a.smooth[href^="#"]').click(function() {
22    const href= $(this).attr("href");
23    const target = $(href);
24    const position = target.offset().top - headerHeightSp;
25    $('body,html').stop().animate({scrollTop:position}, 500);
26	return false;
27});
28          
29});
30          
31  
32} else{
33  //tablet,pc
34        
35$(function(){
36const headerHeightPc = $('nav.gnav').outerHeight();
37//const headerHeightPc = 100;
38const urlHash = location.hash;
39    
40        //ページ外リンクスクロール
41     if(urlHash) {
42     $('body,html').stop().scrollTop(0);
43    setTimeout(function(){
44        const target = $(urlHash);
45        const position = target.offset().top - headerHeightPc;
46        $('body,html').stop().animate({scrollTop:position}, 500);}, 100);
47}
48  
49        //ページ内スクロール      
50$('.smooth a[href^="#"],a.smooth[href^="#"]').click(function() {
51    const href= $(this).attr("href");
52    const target = $(href);
53    const position = target.offset().top - headerHeightPc;
54    $('body,html').stop().animate({scrollTop:position}, 500);
55	return false;
56});    
57    
58    
59	});
60
61}

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.