PageSourceSearch

https://www.fudotetra-env.jp/js/fontsize.js

js fudotetra-env.jp collected 2026-10-08 01:15:50 UTC 1,199 bytes, 42 lines download raw bytes

1// JavaScript Document
2
3jQuery(function($){
4  //変数にクッキー名を入れる
5  var history = $.cookie('fontSize');
6  
7  //適用する箇所を指定。今回は部分的に#test内のpに
8  var elm = $('body');
9  
10  //変数が空ならfontMを、空でなければクッキーに保存しておいたものを適用
11  if(!history){
12    elm.addClass('fontM');
13    $('#fontM').addClass('active');
14  }else{
15    elm.addClass(history);
16    $('#'+history).addClass('active');
17  }
18  
19  //ボタンをクリックしたら実行
20  $('li','.mod_headerbox_size').click(function(){
21    
22    //activeでないボタンだった場合のみ動作
23    if(!$(this).hasClass('active')){
24      
25      //現在activeのついているclassを削除
26      $('.active').removeClass('active');
27      
28      //クリックしたボタンをactive
29      $(this).addClass('active');
30      
31      //クリックした要素のID名を変数にセット
32      var setFontSize = this.id;
33      
34      //クッキーに変数を保存
35      $.cookie('fontSize', setFontSize);
36      
37      //一度classを除去して、変数をclassとして追加
38      elm.removeClass().addClass(setFontSize);
39    }
40  });
41});
42

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.