PageSourceSearch

https://www.saasforce.co.jp/wp/wp-content/themes/saasforcev2/js/script.js

js saasforce.co.jp collected 2026-10-04 19:21:15 UTC 3,157 bytes, 131 lines download raw bytes

1
2
3// Header fixed
4$(function() {
5  var headNav = $("header");
6  $(window).on('load scroll', function () {
7    if($(this).scrollTop() > 300 && headNav.hasClass('fixed') == false) {
8      headNav.css({"top": '-100px'});
9      headNav.addClass('fixed');
10      headNav.animate({"top": 0},1000);
11    }
12    else if($(this).scrollTop() < 300 && headNav.hasClass('fixed') == true){
13      headNav.removeClass('fixed');
14    }
15  });
16});
17
18// Character abbreviation
19jQuery(function($) {
20  $('.textovf').each(function() {
21    var $target = $(this);
22 
23    var html = $target.html();
24 
25    var $clone = $target.clone();
26    $clone
27      .css({
28        display: 'none',
29        position : 'absolute',
30        overflow : 'visible'
31      })
32      .width($target.width())
33      .height('auto');
34 
35    $target.after($clone);
36 
37    while((html.length > 0) && ($clone.height() > $target.height())) {
38      html = html.substr(0, html.length - 1);
39      $clone.html(html + '...');
40    }
41 
42    $target.html($clone.html());
43    $clone.remove();
44  });
45});
46
47//In-page links
48$(window).on('load', function() {
49  var url = $(location).attr('href');
50  if(url.indexOf("?id=") != -1){
51  var id = url.split("?id=");
52  var $target = $('#' + id[id.length - 1]);
53    if($target.length){
54      var pos = $target.offset().top;
55      $("html, body").animate({scrollTop:pos}, 1000);
56    }
57  }
58});
59
60//TOPへ戻る
61
62
63
64// faq
65$(function() {
66  //最初は全てのパネルを非表示に
67  $('dl.faq > dd').hide();
68  $('dl.faq > dt')
69    .click(function(e){
70 //選択したパネルを開く
71      $('+dd', this).slideToggle(500);
72    })
73});
74
75// googleMap
76$(function() {
77    var map = $('iframe');
78    map.css('pointer-events', 'none');
79    $('.map_wrapper').click(function() {
80      map.css('pointer-events', 'auto');
81    });
82    map.mouseout(function() {
83      map.css('pointer-events', 'none');
84    });
85  })
86
87
88
89// サイドナビ
90$(window).on('load scroll', function(){
91  if ($(window).scrollTop() > 200) {
92    $('ul.sidnav').fadeIn(400);
93   } else {
94    $('ul.sidnav').fadeOut(400);
95   }
96});
97
98// ページ内スムーズスクロール
99$(function(){
100  $('a[href^="#"]').click(function(){
101    var adjust = -50;
102    var speed = 500;
103    var href= $(this).attr("href");
104    var target = $(href == "#" || href == "" ? 'html' : href);
105    var position = target.offset().top + adjust;
106    $('body,html').animate({scrollTop:position}, speed, 'swing');
107    return false;
108  });
109});
110
111
112// Loading
113window.onload = function() {
114  const spinner = document.getElementById('loading');
115  spinner.classList.add('loaded');
116}
117
118// 「メニューを閉じる」リンクのクリックイベントを設定
119var closeMenu = document.getElementById('close-menu');
120if (closeMenu) {
121  closeMenu.addEventListener('click', function(event) {
122    event.preventDefault(); // デフォルトのリンク動作を無効化
123    var navLinks = document.getElementById('cd-nav');
124    var menuIcon = document.getElementById('cd-header-buttons');
125    var overlay = document.getElementById('overlay');
126    
127    navLinks.classList.remove('active');
128    menuIcon.classList.remove('active');
129    overlay.classList.remove('active');
130  });
131}

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.