PageSourceSearch

https://www.shinzansha.co.jp/js/14/common.js?u=2026031317

js shinzansha.co.jp collected 2026-10-02 06:43:52 UTC 6,022 bytes, 217 lines download raw bytes

1$(function(){
2
3  "use strict";
4
5  // custommenu
6  var menu = $("#side_column .custommenu");
7  menu.find("span").each(function(){
8    // 下層が存在すれば
9    var self = $(this);
10    var child = $(this).find("> div");
11    if(child.length) {
12      var ck = $('<div class="ck" />');
13      self.css('cursor','pointer').prepend(ck);
14      // aタグのまわりをクリックで開閉
15      self.click(function(){
16        ck.toggleClass('open');
17        child.slideToggle('fast');
18        return false;
19      });
20      // 下層は伝播させない(aタグが遷移するように)
21      self.find("a,div:not('.ck')").click(function(e){
22        e.stopPropagation();
23      });
24    }
25  });
26
27  // pageScroller
28  if(typeof $.fn.pageScroller === "function"){
29    $(".pagetop").find("a").pageScroller();
30  }
31
32  // searchBox
33  var gnavi = $("#gnavi");
34  var searchBox =$("#searchBox");
35  var overlay = $("#overlay");
36
37  $(".btnSearchBox").click(function(){
38    //背景固定
39    $('body').addClass('fixed');
40
41    var windowWidth = (window.innerWidth  - searchBox.width() - 60) / 2;
42    searchBox.show().css({
43      top: $(window).scrollTop() + 60,
44      left: windowWidth
45    });
46    overlay.show();
47    return false;
48  });
49
50  searchBox.find(".close a").click(function(){
51    //背景固定解除
52    $('body').removeClass('fixed');
53    searchBox.removeAttr('style').hide();
54    overlay.hide();
55    return false;
56  });
57
58  $("#overlay").click(function(){
59    //背景固定解除
60    $('body').removeClass('fixed');
61  })
62
63
64  // 詳細検索 現在の条件をクリア ボタン
65  searchBox.find(".search_clear").click(function(){
66    // テキスト、ジャンル、シリーズプルダウンを未選択へ
67    searchBox.find("input[type=text], textarea, [name=search_genre],[name=search_series]").val("");
68
69    searchBox.find("[name=amount],[name=order]").each(function(){
70      // 表示件数、並び順は プルダウンの一番上を選択
71      $(this).find("option").eq(0).prop("selected",true);
72    });
73    // 試し読みのチェック
74    var trial = searchBox.find("#searchBox_trial_status");
75    if(trial.length) {
76      trial.prop("checked", false);
77    }
78    // 検索範囲選択
79    var format1 = searchBox.find("#searchBox_format1");
80    if(format1.length) {
81      format1.prop("checked",true);
82    }
83    return false;
84  });
85
86  overlay.click(function(){
87    searchBox.removeAttr('style').hide();
88    overlay.hide();
89    return false;
90  });
91
92  // slideType1
93  var slideType1 = $(".slideType1");
94  if(slideType1.length > 0){
95    slideType1.each(function(){
96      var ul = $(this).find("ul");
97      if(ul.children().length >= 6){
98        var slider = ul.bxSlider({
99          pager: false,
100          responsive: false,
101          auto: true,
102          pause: 6000,
103          autoHover: true,
104          moveSlides: 1,
105          minSlides: 6,
106          maxSlides: 6,
107          prevText:"",
108          nextText:"",
109        });
110
111        var ttlHeight = $('.ttlWrap').height();
112        var parentHeight = slideType1.height() - ttlHeight;
113        // console.log(parentHeight);
114        $('.bx-controls-direction a').css({
115            top : parentHeight/2 + 'px',
116        });
117      }
118    });
119  }
120
121  // slideType2
122  // var slideType2 = $(".slideType2");
123  // if(slideType2.length > 0){
124  //   slideType2.each(function(){
125  //     var ul = $(this).find("ul");
126  //     if(ul.children().length >= 4){
127  //       var slider = ul.bxSlider({
128  //         pager: false,
129  //         responsive: false,
130  //         auto: true,
131  //         pause: 6000,
132  //         prevText:"",
133  //         nextText:"",
134  //         moveSlides: 1,
135  //         minSlides: 4,
136  //         maxSlides: 4,
137  //       });
138
139  //       var ttlHeight = $('.ttlWrap').height();
140  //       var parentHeight = slideType2.height() - ttlHeight;
141  //       // console.log(parentHeight);
142  //       $('.bx-controls-direction a').css({
143  //           top : parentHeight/2 + 'px',
144  //       });
145  //     }
146  //   });
147  // }
148
149  // sub
150  var sub = $("#sub");
151  sub.find(".switch").each(function(){
152    var ul = $(this).parents("li").first().children("ul");
153    if(ul.length > 0 && ul.children("li:not(.none)").length > 0){
154      $(this).css("visibility", "visible");
155    }
156  });
157
158  var defaultOpen = sub.find(".defaultOpen");
159  defaultOpen.find("ul").show();
160  defaultOpen.parents("ul").show();
161
162  sub.find(".switch").click(function(){
163    var ul = $(this).parents("li").first().children("ul");
164    if(ul.is(":visible")){
165      ul.slideUp("fast");
166    }else{
167      ul.slideDown("fast");
168    }
169  });
170
171  // スマホメニュー
172  var gnavi = $('#gnavi');
173  var spbtn = gnavi.find('.wrap .btn');
174  spbtn.click(function(){
175    if(!gnavi.hasClass('open')) {
176      // メニュー開く
177      gnavi.addClass('open');
178    } else {
179      // メニュー閉じる
180      gnavi.removeClass('open');
181    }
182  });
183  gnavi.on('click',function(e){
184    if(gnavi.hasClass('open')) {
185      if(
186        !$.contains($('#gnavi .wrap')[0], e.target)
187      ){
188        // メニュー閉じる
189        gnavi.removeClass('open');
190      }
191    }
192  });
193});
194
195// $(window).load(function(){
196//   $(".listType1 .image").tile(5);
197//   $(".listType1 .txt").tile(5);
198//   $(".listType1 .btns").tile(5);
199//   // $(".custommenu .submenublock").tile();
200
201//   $(".bookWrap ul.ro .image").tile(3);
202//   $(".bookWrap ul.ro .txt").tile(3);
203//   $(".bookWrap ul.ro li").tile(3);
204
205//   $(".slideType1.genre ul.ro .image").tile();
206//   $(".slideType1.genre ul.ro .txt").tile();
207//   $(".slideType1.genre ul.ro li").tile();
208//   $(".slideType1.recommend ul.ro .image").tile();
209//   $(".slideType1.recommend ul.ro .txt").tile();
210//   $(".slideType1.recommend ul.ro li").tile();
211//   $(".slideType2.relateve ul.ro .image").tile();
212//   $(".slideType2.relateve ul.ro .txt").tile();
213//   $(".slideType2.relateve ul.ro li").tile();
214//   $(".slideType2.sectionType1 ul.ro .image").tile();
215//   $(".slideType2.sectionType1 ul.ro .txt").tile();
216//   $(".slideType2.sectionType1 ul.ro li").tile();
217// });

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.