PageSourceSearch

https://i-nail-a.org/wp-content/themes/i-nail-a/js/function.js

js i-nail-a.org collected 2026-10-02 15:14:05 UTC 2,040 bytes, 79 lines download raw bytes

1
2jQuery(function($) {
3
4// GNAV
5var nav    = $('#fixedBox'),
6    offset = nav.offset();
7  
8$(window).scroll(function () {
9  if($(window).scrollTop() > offset.top) {
10    nav.addClass('fixed');
11  } else {
12    nav.removeClass('fixed');
13  }
14});
15
16//nav プルダウン用
17document.getElementById("fixedBox").onclick = function() {
18  this.classList.toggle("open");
19};
20
21// pagetop
22var pagetop = $('.pagetop');
23    $(window).scroll(function () {
24        if ($(this).scrollTop() > 700) {
25            pagetop.fadeIn();
26        } else {
27            pagetop.fadeOut();
28        }
29    });
30    pagetop.click(function () {
31        $('body, html').animate({ scrollTop: 0 }, 500);
32        return false;
33    });
34
35  // ページ内リンク
36  // ★ 任意のズレ高さピクセル数を入力 ↓
37  var headerHight = 100;
38   // #で始まるアンカーをクリックした場合に処理
39   jQuery('a[href^=#]').click(function() {
40    // スクロールの速度
41    var speed = 800; // ミリ秒
42    // アンカーの値取得
43    var href= jQuery(this).attr("href");
44    // 移動先を取得
45    var target = jQuery(href == "#" || href == "" ? 'html' : href);
46    // 移動先を数値で取得
47    var position = target.offset().top-headerHight; // ※ -headerHightでズレの処理
48    // スムーズスクロール
49    jQuery('body,html').animate({scrollTop:position}, speed, 'swing');
50    return false;
51   });
52
53  //リンク先ページの指定位置に移動
54  var url = $(location).attr('href');
55  if (url.indexOf("?id=") == -1) {
56  }else{
57    // スクロールの速度
58    var speed = 800; // ミリ秒
59    // 移動先を取得
60    var url_sp = url.split("?id=");
61    var hash = '#' + url_sp[url_sp.length - 1];
62    var target = $(hash);
63    // 移動先を数値で取得
64    var position = target.offset().top -100;
65    $("html, body").animate({scrollTop:position}, speed, "swing");
66  }
67
68});
69
70// 高さ合わせ
71$(function(){
72  $(".tile1").tile();
73});
74$(function(){
75  $(".tile2").tile();
76});
77$(function(){
78  $(".tile3").tile();
79});

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.