PageSourceSearch

https://www.city.nasushiobara.tochigi.jp/theme/base/js/sub.js

js city.nasushiobara.tochigi.jp collected 2026-10-02 05:48:53 UTC 4,591 bytes, 135 lines download raw bytes

1/**
2 * サブページ専用jsセット
3 */
4
5$(function(){
6
7	//文字サイズ変更監視 ボックスの高さを揃える
8	$.fn.fontSizeChange({func:function(){
9		$(".level1col2").eqGroupHeight(2);
10		$(".level2col1 .list").eqGroupHeight(2);
11    $(".level1-gaiyo").eqGroupHeight(2);
12    $(".level1col2-gaiyo .col").eqGroupHeight(2);
13
14    $(".level2col2 .box2 .list").eqGroupHeight(2);
15
16    //混在用
17    $(".level2col1-mixed .list").eqGroupHeight(2);
18    $(".level2col2-mixed .col").eqGroupHeight(2);
19    $(".level2col2-mixed .box2 .list").eqGroupHeight(2);
20    $(".level2col2-mixed-js .col").eqGroupHeight(2);
21    $(".level2col2-mixed-js .box2 .list").eqGroupHeight(2);
22
23    $(".thumbnail-list-area .list").eqGroupHeight(3);
24
25		$("#wrapper").show();
26	}});
27
28
29	// wysiwygとフリーレイアウトエリア内で使用されるh2,h3,h4などに装飾用要素を追加
30  (function(){
31    //ターゲット要素
32    $target = $('.wysiwyg h2,.wysiwyg h3,.wysiwyg h4,.wysiwyg h5,.wysiwyg h6,.free-layout-area h2,.free-layout-area h3,.free-layout-area h4,.free-layout-area h5,.free-layout-area h6');
33    //装飾用要素
34    $innerElm1 = $('<span class="bg"></span>');
35    $innerElm2 = $('<span class="bg2"></span>');
36    $innerElm3 = $('<span class="bg3"></span>');
37    //ターゲット要素に装飾用要素を内包
38    $target.each(function(){
39      $this = $(this);
40      if($this.find('span').length == 0){
41        $this.wrapInner($innerElm3);
42        $this = $this.wrapInner($innerElm2);
43        $this = $this.wrapInner($innerElm1);
44      }
45    });
46  })();
47
48	//2階層2列(管理画面で並べないモード。ページ優先・カテゴリ優先用)
49	$(".level2col2,.level2col2js").level2Col2();
50
51	//2階層1列
52	$(".level2col1").level2Col1();
53
54	// 左寄せ画像、右寄せ画像の最初の要素は上マージンを持たせない
55	$('.img-text .wysiwyg').each(function() {
56		$(this).find(' > :first').addClass('firstTopCom');
57	});
58
59  //横並び画像
60  $(window).on('load resize',function(){
61    $(".col-area").colImgSetWidth();
62    $(".thumbnail-list-area .list").eqGroupHeight(3);
63  });
64
65  //イベントスライダーの実行
66  $("body").eventSlider();
67
68  //大カテゴリトップスライダー
69  $('#large-category-slider .bxslider .list').bxSlider({
70    auto: true
71    ,autoControls: true
72    ,speed: 1000
73    ,pause: 5000
74    ,slideWidth: 700
75    ,maxSlides: 1
76    ,minSlides: 1
77    ,pager: false
78    ,slideMargin: 0
79  });
80
81  (function(){
82    var newsList = 5;
83    var newsMoreText = '新着情報を更に表示';
84    var newsListSize = $('#contents-large-category .news-area .list li').length;
85
86    if (newsListSize > newsList) {
87      $('#contents-large-category .news-area .in').append('<ul class="more"><li><a href="#">' + newsMoreText + '</a></li></ul>');
88      $('#contents-large-category .news-area .list li:not(:lt(' + newsList + '))').hide();
89
90      $('#contents-large-category .news-area .more li a').click(function(e){
91        e.preventDefault();
92        if ($('#contents-large-category .news-area .list li:eq(' + newsList + ')').is(':hidden')){
93          $('#contents-large-category .news-area .list li:hidden').show();
94          $('#contents-large-category .news-area .more').hide();
95        }
96      });
97    }
98
99  })();
100
101
102});
103
104$(window).on('load resize orientationchange',function(){
105
106  function calendarBoxStyleChange(){
107
108    var $calendarTarget = $(".calendar-box-area .calendar-area");
109    var $calendarWeekTarget = $(".calendar-box-area .calendar-area .week-row th");
110
111    var sunW = $calendarWeekTarget.eq(0).width();
112    var monW = $calendarWeekTarget.eq(1).width();
113    var tueW = $calendarWeekTarget.eq(2).width();
114    var wedW = $calendarWeekTarget.eq(3).width();
115    var thuW = $calendarWeekTarget.eq(4).width();
116    var friW = $calendarWeekTarget.eq(5).width();
117    var satW = $calendarWeekTarget.eq(6).width();
118
119    $calendarTarget.css({
120      "background-positionX": (sunW + monW + tueW + wedW + thuW + friW) + "px," + (sunW + monW + tueW + wedW + thuW) + "px," + (sunW + monW + tueW + wedW) + "px," + (sunW + monW + tueW) + "px," + (sunW + monW) + "px," + sunW + "px," + "0px"
121    });
122
123  }
124
125  var $calendarChangeTarget = $(".calendar-list-area .changeCalendarType, .calendar-box-area .calGoCurrentMonth, .calendar-box-area .calGoPrevMonth, .calendar-box-area .calGoNextMonth");
126
127  $calendarChangeTarget.click(function(){
128
129    calendarBoxStyleChange();
130
131  });
132
133  calendarBoxStyleChange();
134
135});

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.