PageSourceSearch

https://www.keneibus.jp/js/functions.js

js keneibus.jp collected 2026-10-02 07:18:50 UTC 1,924 bytes, 66 lines download raw bytes

1//電話番号を取得しスマホでリンクを生成
2$(function() {
3  $('.tellink').each(function() {
4//.tel内のHTMLを取得
5    var str = $(this).html();
6//子要素がimgだった場合、alt属性を取得して電話番号リンクを追加
7    if ($(this).children().is('img')) {
8      $(this).html($('<a>').attr('href', 'tel:' + $(this).children().attr('alt').replace(/-/g, '')).append(str + '</a>'));
9    } else {
10//それ以外はテキストを取得して電話番号リンクを追加
11      $(this).html($('<a>').attr('href', 'tel:' + $(this).text().replace(/-/g, '')).append(str + '</a>'));
12    }
13  });
14});
15
16//ページトップ
17$(function() {
18    var topBtn = $('#page-top-pc');
19    topBtn.hide();
20    //スクロールが100に達したらボタン表示
21    $(window).scroll(function () {
22        if ($(this).scrollTop() > 300) {
23        //ボタンの表示方法
24            topBtn.fadeIn();
25        } else {
26        //ボタンの非表示方法
27            topBtn.fadeOut();
28        }
29    });
30    //スクロールしてトップ
31    topBtn.click(function () {
32        $('body,  html').animate({
33            scrollTop: 0
34        },   500);
35        return false;
36    });
37});
38
39$(function() {
40var topBtn = $('#page-top-sp');
41topBtn.hide();
42$(window).scroll(function () {
43var bottomPos = 1000;
44var scrollHeight = $(document).height();
45var scrollPosition = $(window).height() + $(window).scrollTop();
46if (scrollPosition > scrollHeight - bottomPos) {
47topBtn.fadeIn();}
48else { topBtn.fadeOut();
49}
50});
51
52topBtn.click(function () {
53$('body,html').animate({
54scrollTop: 0}, 500);
55return false;
56});
57});
58
59 // 運行ルートウィジェット表示非表示
60function toggle_condition(button) {
61  $(button).find('panel-display').toggle();
62  $(button).find('.panel_toggle').toggle();
63  $(button).next('.panel-body').toggle();
64  scroll_resize();
65}
66

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.