PageSourceSearch

https://www.bandainamco.co.jp/assets/js/common.js

js bandainamco.co.jp collected 2026-10-02 04:50:26 UTC 3,935 bytes, 133 lines download raw bytes

1
2// google analytics tags
3var __GTMID = 'GTM-N9CKQRS';
4
5// 01. GLOBALNAVI
6//------------------------------------------------------------------------------------
7// PC グローバルメニュー制御(ホバー)
8$(function() {
9  $(".js-gNav").on('mouseenter focusin', function() {
10    $(this).children(".l-gNav__inner").addClass("is-open");
11  });
12
13  $(".js-gNav").on('mouseleave focusout', function(e) {
14    // e.relatedTargetが子要素にフォーカスを移している場合は削除しない
15    if (!$(this).has(e.relatedTarget).length) {
16      $(this).children(".l-gNav__inner").removeClass("is-open");
17    }
18  });
19});
20
21// スマホ グローバルメニュー制御(クリック)
22$(function(){
23  // 親階層のメニューオープン
24  $('#js-gHeaderSpMenuBtn').on('click', function() {
25    $(".l-gNav").toggleClass('is-sp-open');
26  });
27  // 子階層のメニュー ToggleClass
28  $('.icn-square-plus').on('click', function() {
29    $(this).prev("a").toggleClass('current');
30    $(this).toggleClass('is-open');
31  });
32  // 子階層のメニューオープン
33  $('.js-spNav').click(function(){
34    $(this).next('.l-gNav__inner').slideToggle("is-open");
35  });
36});
37
38$(function() {
39  $('.js-searchOpenTrigger').bind('click', function(){
40    $('.js-searchOpenForm').stop().fadeToggle(500);
41  });
42  $('.js-searchOpenTrigger').on('keydown', function(e) {
43    if (e.key === 'Enter') {
44      $(this).trigger('click');
45    }
46  });
47  $('.js-searchCloseTrigger').bind('click', function(){
48    $('.js-searchOpenForm').stop().fadeOut(500);
49  });
50  $(document).on('click touchend', function(e) {
51    if (!$(e.target).closest('.js-searchOpenForm, .js-searchOpenTrigger').length) {
52      $('.js-searchOpenForm').stop().fadeOut(500);
53    }
54  });
55  $('.js-searchOpenForm').on('focusout', function(e) {
56    if (!$(e.relatedTarget).closest('.js-searchOpenForm').length && !$(e.relatedTarget).closest('.js-searchOpenTrigger').length) {
57      $('.js-searchOpenForm').stop().fadeOut(1);
58    }
59  });
60});
61
62// プレスリリース年別リスト読み込み
63$(function(){
64  $.get('/releases/_parts/yearList.html', {}, function(data){
65    var $root = $(data).filter("#bnhd-items-root");
66    $root.children().appendTo($(".js-releases-year-list"));
67  }, "html");
68});
69$(function(){
70  $.get('/en/releases/_parts/yearList.html', {}, function(data){
71    var $root = $(data).filter("#bnhd-items-root");
72    $root.children().appendTo($(".js-en-releases-year-list"));
73  }, "html");
74});
75
76// 02. SMOOTH SCROLL
77//------------------------------------------------------------------------------------
78$(function(){
79  $('a[href^="#"]:not(.colorbox-trigger)').click(function(){
80    var speed = 500;
81    var href= $(this).attr("href");
82    var target = $(href == "#" || href == "" ? 'html' : href);
83    var position = target.offset().top;
84    $("html, body").animate({scrollTop:position}, speed, "swing");
85    return false;
86  });
87});
88$(function() {
89  var topBtn = $('.btn-scrolltop');    
90  topBtn.hide();
91  $(window).scroll(function () {
92      if ($(this).scrollTop() > 700) {
93          topBtn.fadeIn("1500");
94      } else {
95          topBtn.fadeOut("1500");
96      }
97  });
98});
99
100
101
102// 05. SCROLL REVEAL
103//------------------------------------------------------------------------------------
104$(function(){
105   if($('.js-purpose-lead').length){
106     ScrollReveal().reveal('.js-purpose-lead',{ 
107        duration: 1000,
108        interval: 150,
109        opacity: 0,
110        easing: 'ease-in'
111      });
112   }
113   if($('.js-purpose-logo').length){
114    ScrollReveal().reveal('.js-purpose-logo',{ 
115      duration: 700,
116      interval: 150,
117      distance: '2em',
118      origin: 'right',
119      opacity: 0,
120      easing: 'ease-out'
121    });
122   }
123   if($('.js-purpose-movie').length){
124    ScrollReveal().reveal('.js-purpose-movie',{ 
125      duration: 700,
126      interval: 150,
127      distance: '2em',
128      origin: 'left',
129      opacity: 0,
130      easing: 'ease-out'
131    });
132   }
133});

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.