PageSourceSearch

https://flagman.co.jp/common/js/common.js?1

js flagman.co.jp collected 2026-10-07 12:19:14 UTC 10,117 bytes, 373 lines download raw bytes

1//スクロール 徐々に拡大
2$(window).on('scroll', function(){
3
4  //スクロール位置を取得
5  var scrollY = $(window).scrollTop();
6  //background-size+(スクロール位置/10)
7  var bgSize = 100+(scrollY/50);
8
9  //bgSizeが200より小さければ
10  if(bgSize < 200){
11    //background-sizeにbgSizeを設定
12    $('.main_vImg:nth-child(2)').css('width', bgSize+'%');
13  }
14});
15//クローン
16$('.main_v .main_vImg').clone().appendTo('.main_v');
17
18/*
19$(function() {
20    $('a:not([href^="#"]):not([target])').on('click', function(e){
21        e.preventDefault();
22        url = $(this).attr('href');
23        if (url !== '') {
24            $('body').addClass('fadeout');
25            setTimeout(function(){
26                window.location = url;
27            }, 200);
28        }
29        return false;
30    });
31});
32	*/
33
34//メニュー
35$(function () {
36  $('.navToggle').click(function () {
37    $(this).toggleClass('active');
38      $('.modaal-close').trigger('click');
39    if ($(this).hasClass('active')) {
40      $('.globalMenuSp').addClass('active');
41    } else {
42      $('.globalMenuSp').removeClass('active');
43    }
44  });
45  $('.gnavi li a').click(function () {
46    $('.globalMenuSp').removeClass('active');
47    $('.navToggle').removeClass('active');
48    
49  });
50  $('a[href^="#"]').click(function () {
51    var speed = 500;
52    var href = $(this).attr("href");
53    var target = $(href == "#" || href == "" ? 'html' : href);
54    var position = target.offset().top;
55    $("html, body").animate({
56      scrollTop: position
57    }, speed, "swing");
58    return false;
59  });
60});
61
62
63$(".main .ttl").css({
64  bottom: "-10px",
65  opacity: "0.0"
66}).animate({
67  bottom: "0px",
68  opacity: "1.0"
69}, 2000);
70
71/*
72$(function () {
73  // スクロールバーの横幅を取得
74  $('html').append('<div class="scrollbar" style="overflow:scroll;"></div>');
75  var scrollsize = window.innerWidth - $('.scrollbar').prop('clientWidth');
76  $('.scrollbar').hide();
77
78  // 「.modal-open」をクリック
79  $('.modal-open').click(function () {
80    // html、bodyを固定(overflow:hiddenにする)
81    $('html, body').addClass('lock');
82
83    // オーバーレイ用の要素を追加
84    $('body').append('<div class="modal-overlay"></div>');
85
86    // オーバーレイをフェードイン
87    $('.modal-overlay').fadeIn('slow');
88
89    // モーダルコンテンツのIDを取得
90    var modal = '#' + $(this).attr('data-target');
91
92    // モーダルコンテンツを囲む要素を追加
93    $(modal).wrap("<div class='modal-wrap'></div>");
94
95    // モーダルコンテンツを囲む要素を表示
96    $('.modal-wrap').show();
97
98    // モーダルコンテンツの表示位置を設定
99    modalResize();
100
101    // モーダルコンテンツフェードイン
102    $(modal).fadeIn('slow');
103
104    // モーダルコンテンツをクリックした時はフェードアウトしない
105    $(modal).click(function (e) {
106      e.stopPropagation();
107    });
108
109    // 「.modal-overlay」あるいは「.modal-close」をクリック
110    $('.modal-wrap, .modal-close').off().click(function () {
111      // モーダルコンテンツとオーバーレイをフェードアウト
112      $(modal).fadeOut('slow');
113      $('.modal-overlay').fadeOut('slow', function () {
114        // html、bodyの固定解除
115        $('html, body').removeClass('lock');
116        // オーバーレイを削除
117        $('.modal-overlay').remove();
118        // モーダルコンテンツを囲む要素を削除
119        $(modal).unwrap("<div class='modal-wrap'></div>");
120      });
121    });
122
123    // リサイズしたら表示位置を再取得
124    $(window).on('resize', function () {
125      modalResize();
126    });
127
128    // モーダルコンテンツの表示位置を設定する関数
129    function modalResize() {
130      // ウィンドウの横幅、高さを取得
131      var w = $(window).width();
132      var h = $(window).height();
133
134      // モーダルコンテンツの横幅、高さを取得
135      var mw = $(modal).outerWidth(true);
136      var mh = $(modal).outerHeight(true);
137
138      // モーダルコンテンツの表示位置を設定
139      if ((mh > h) && (mw > w)) {
140        $(modal).css({
141          'left': 0 + 'px',
142          'top': 0 + 'px'
143        });
144      } else if ((mh > h) && (mw < w)) {
145        var x = (w - scrollsize - mw) / 2;
146        $(modal).css({
147          'left': x + 'px',
148          'top': 0 + 'px'
149        });
150      } else if ((mh < h) && (mw > w)) {
151        var y = (h - scrollsize - mh) / 2;
152        $(modal).css({
153          'left': 0 + 'px',
154          'top': y + 'px'
155        });
156      } else {
157        var x = (w - mw) / 2;
158        var y = (h - mh) / 2;
159        $(modal).css({
160          'left': x + 'px',
161          'top': y + 'px'
162        });
163      }
164    }
165
166  });
167});
168*/
169var itemHeights = []; //
170$(function () {
171  $(".grad-item").each(function () { //ターゲット(縮めるアイテム)
172    var thisHeight = $(this).height(); //ターゲットの高さを取得
173    itemHeights.push(thisHeight); //それぞれの高さを配列に入れる
174    $(this).addClass("is-hide"); //CSSで指定した高さにする
175  });
176});
177
178$(".grad-trigger").click(function () {
179  var index = $(this).index(".grad-trigger"); //トリガーが何個目か
180  var addHeight = itemHeights[index];
180 //個数に対応する高さを取得
181  $(this).fadeOut().addClass("is-show").next().animate({
182    height: addHeight
183  }, 200).removeClass("is-hide"); //高さを元に戻す
184});
185$(function () {
186  $(window).scroll(function () {
187    $('.fadein').each(function () {
188      var elemPos = $(this).offset().top;
189      var scroll = $(window).scrollTop();
190      var windowHeight = $(window).height();
191      if (scroll > elemPos - windowHeight + 200) {
192        $(this).addClass('scrollin');
193      }
194    });
195  });
196});
197
198if (navigator.userAgent.match(/(iPhone|iPad|iPod|Android)/i)) {
199  /*
200  $(function() {
201  var nav = $('.gnavi');
202  $('li', nav)
203  .mouseover(function(e) {
204  $('ul', this).stop().slideDown('fast');
205  })
206  .mouseout(function(e) {
207  $('ul', this).stop().slideUp('fast');
208  });
209  });
210  */
211  //
212$(function () {
213  $('a[href^=#]').click(function () {
214    var href = $(this).attr("href");
215    var target = $(href == "#" || href == "" ? 'html' : href);
216    var position = target.offset().top;
217    $("html, body").animate({
218      scrollTop: position
219    }, 1300, "swing");
220    return false;
221  });
222});
223
224//more
225$(function () {
226  var division = 12;
227  var divlength = $('#list .li').length;
228  dlsizePerResult = divlength / division;
229  for (i = 1; i <= dlsizePerResult; i++) {
230    $('#list .li').eq(division * i - 1)
231      .after('<div class="col-md-12"><p class="morelink font_Didot font-size-14 text-center more margin_t_large link' + i + '"><span>View More Works</span></p></div>');
232  }
233  $('#list .li,.morelink').hide();
234  for (j = 0; j < division; j++) {
235    $('#list .li').eq(j).show();
236  }
237  $('.morelink.link1').show();
238
239  $('.morelink').click(function () {
240    index = $(this).index('.morelink');
241    for (k = 0; k < (index + 2) * division; k++) {
242      $('#list .li').eq(k).fadeIn();
243    }
244
245    $('.morelink').hide();
246    $('.morelink').eq(index + 1).show();
247
248  });
249
250});
251    
252$(window).on('load', function () {
253  var url = $(location).attr('href');
254	
255  if (url.indexOf("?id=") != -1) {
256    var id = url.split("?id=");
257    var $target = $('#' + id[id.length - 1]);
258    if ($target.length) {
259      var pos = $target.offset().top - 980;
260      $("html, body").animate({
261        scrollTop: pos
262      }, 1000);
263    }
264  }
265});
266} else {
267  $(function () {
268    var nav = $('.gnavi');
269    $('li', nav)
270      .mouseover(function (e) {
271        $('ul', this).stop().fadeIn('1000');
272      })
273      .mouseout(function (e) {
274        $('ul', this).stop().fadeOut('1000');
275      });
276  });
277  //
278	$(function () {
279  $('a[href^=#]').click(function () {
280    var href = $(this).attr("href");
281    var target = $(href == "#" || href == "" ? 'html' : href);
282    var position = target.offset().top;
283    $("html, body").animate({
284      scrollTop: position
285    }, 1300, "swing");
286    return false;
287  });
288});
289$(window).on('load', function () {
290  var url = $(location).attr('href');
291	
292  if (url.indexOf("?id=") != -1) {
293    var id = url.split("?id=");
294    var $target = $('#' + id[id.length - 1]);
295    if ($target.length) {
296      var pos = $target.offset().top - 980;
297      $("html, body").animate({
298        scrollTop: pos
299      }, 1000);
300    }
301  }
302});
303}
304
305/*
306if(!navigator.userAgent.match(/(iPhone|iPad|iPod|Android)/)){
307//スマホの場合無効になる処理
308$('.modalw').modaal({
309	overlay_opacity: 1,
310fullscreen: true,
311
312		after_callback_delay: 0,
313		after_open: function() {
314			$('.modaal-wrapper .mod').removeClass('fo2');
315			
316			$('.modaal-wrapper .abs_ttl').hide().fadeIn(2500);
317$('.modaal-container').scroll(function (){
318        $('.fadein2').each(function(){
319var position = $(this).offset().top;
320            var scroll = $('.mod_h').scrollTop();
321            var takasa = $('.modaal-container').height();
322            if (scroll > position - takasa + 200){
323              $(this).addClass('active');
324            }else{
325            $(this).removeClass('active') ;
326        }
327			
328    });
329			});	
330			
331	}
332});
333	
334} else {
335  $('.modalw').modaal({
336	overlay_opacity: 1,
337fullscreen: true,
338after_callback_delay: 0,
339		after_open: function() {
340			$('.modaal-wrapper .mod').removeClass('fo2');
341			$('.modaal-wrapper .abs_ttl').hide().fadeIn(2500);
342	}
343});
344}
345*/
346
347$('.video').modaal({
348	type: 'video',
349	overlay_opacity: .9,
350	background:'#fff'
351});
352
353function togglemodal() {
354    if(!document.body.classList.contains('open')){
355        document.body.classList.add('open');
356
357        var elem = document.getElementById('.video');
358        elem.addEventListener('touchmove', function(e) {
359            var scroll = elem.scrollTop;
360            var range = elem.scrollHeight - elem.offsetHeight - 1;
361            if (scroll < 1) {
362                e.preventDefault();
363                elem.scrollTop = 1;
364            } else if(scroll > range) {
365                e.preventDefault();
366                elem.scrollTop = range;
367            }
368        });
369
370    } else {
371        document.body.classList.remove('open');
372    }
373}

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.