PageSourceSearch

https://www.unisol-gr.com/wp-content/themes/unisol/js/scroll.js

js unisol-gr.com collected 2026-10-07 18:36:46 UTC 1,304 bytes, 38 lines download raw bytes

1$(window).on('load',function(){
2    var locUrl = location.href;
3    var setHash = locUrl.split('#');
4    //現在のページURLに#が含まれる場合はスクロール移動
5    if(setHash[1]){
6        hashMove("#"+setHash[1]);
7    }
8    //#から始まるリンクはスクロール
9    $('a[href^="#"]').on('click',function() {
10        var href = $(this).attr("href");
11        var clkUrl = href.split('#');
12        hashMove("#"+clkUrl[1]);
13    });
14    //#を含むリンクは、リンク先と現在のページのURLを比較して判断
15    $('a[href*="#"]').on('click',function() {
16        var href = $(this).attr("href");
17        var pageURL = location.pathname;
18        reg = new RegExp(pageURL);
19        //ページ名が同じならスクロール移動
20        if (href.match(reg)) {
21            var clkUrl = href.split('#');
22            hashMove("#"+clkUrl[1]);
23        }
24    });
25
26    function hashMove(trg){
27        var position = $(trg).offset().top;
28        $('body,html').animate({scrollTop:position}, '800', 'swing');
29    }
30});
31
32
33jQuery(document).ready(function($) {
34    $('#pageUp a').on('click', function(e) {
35        e.preventDefault(); // デフォルトのリンク動作を防止
36        $('html, body').animate({scrollTop: 0}, 500); // スムーススクロール
37    });
38});

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.