PageSourceSearch

https://www.niad.ac.jp/themes/site2016/js/top.js?date=20221125100413

js niad.ac.jp collected 2026-10-01 11:32:34 UTC 1,606 bytes, 45 lines download raw bytes

1// トップページのスライダーの設定
2$(function() {
3	$('.js-slider').slick({
4		accessibility: true,
5		dots: true,
6		arrows: true,
7		prevArrow: '<button type="button" class="slick-prev">前へ</button>',
8		nextArrow: '<button type="button" class="slick-next">次へ</button>',
9		autoplay: true,
10		autoplaySpeed: 3000,
11		pauseOnHover : false
12	});
13
14	// スライダーの内容を通達する時をフォーカスしている時のみに変更
15	var $slickList = $('.slick-list');
16	$slickList.removeAttr('aria-live');
17
18	$slickList.on('focus', function() {
19	    $slickList.attr('aria-live', 'polite');
20	});
21	$slickList.on('blur', function() {
22	    $slickList.removeAttr('aria-live', 'polite');
23	});
24
25	// autoPlay:true時に使用する再生・停止ボタンを追加(autoPlayを使用しない場合は削除してください)
26	var $pauseBtn = $('<button type="button" id="autoplay-btn" aria-live="polite"><span class="js-slider-text acms-hide-visually">スライダーを自動再生を停止する</span></button>');
27	$pauseBtn.prependTo($('.js-slider'));
28	var $innerText = $('.js-slider-text')
29
30	$('.autoplay-btn-play:first-child').hide();
31	var play = true;
32	// 停止ボタンをクリックした時の処理
33	$('#autoplay-btn').click(function(){
34		$pauseBtn.toggleClass('active');
35		if(play === true) {
36			$('.js-slider').slick('slickPause');
37            $innerText.text('スライダーを自動再生する');
38			play = false;
39		} else {
40			$('.js-slider').slick('slickPlay');
41            $innerText.text('スライダーの自動再生を停止する');
42			play = true;
43		}
44	});
45});

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.