PageSourceSearch

https://www.oka-fb.com/semi-shoka/js/script.js

js oka-fb.com collected 2026-10-02 17:23:56 UTC 1,272 bytes, 42 lines download raw bytes

1$(function(){
2  var $dropdown = $('.js-dropdown');
3  var DURATION = 200; //アニメーションの速さ
4
5  //ドロップダウンを非表示にする
6  function fadeOutMenu(){
7    $dropdown.removeClass('is-active')
8      .next('.js-dropdown-menu')
9      .stop()
10      .fadeOut(DURATION);
11  }
12
13  //表示を切り替える
14  function toggleMenu(){
15    var $self = $(this); //thisにはクリックした時の要素が入る
16    //要素が.is-activeを持っていない場合
17    if(!$self.hasClass('is-active')){
18      fadeOutMenu();
19    }
20    //クリックした要素を表示させる
21    $self.toggleClass('is-active')
22      .next('.js-dropdown-menu')
23      .stop().fadeToggle(DURATION);
24  }
25
26  $dropdown.on('click', toggleMenu);
27  $('.l-content').on('click', fadeOutMenu);
28});
29
30// ページトップへ戻るを指定する
31(function($){
32	var $jsPagetop = $( '#js-pageTop'); //ボタン要素のidを変数に格納する
33	var Duration = 300; // アニメーションの時間(ミリ秒)
34
35  $jsPagetop.on('click', function (e) {
36		e.preventDefault(); // 要素のデフォルトイベントをキャンセルする
37		// 画面要素のスクロール位置を0にする
38		$('html, body').stop().animate({
39			scrollTop: 0
40		}, Duration);
41	});
42})(jQuery);

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.