PageSourceSearch

https://www.twin-stars.co.jp/new-shop/js/shop-menu.js

js twin-stars.co.jp collected 2026-10-05 00:05:43 UTC 1,413 bytes, 74 lines download raw bytes

1//メニュー表示
2$(function(){
3	
4	var
5	  winW = $(window).width(),
6		winH = $(window).height(),
7		nav = $('#mainnav ul a'),
8		curPos = $(this).scrollTop();
9	
10	if (winW < 880){
11		var headerH =0;
12	}
13	else{
14		var headerH =63;
15	}
16	
17	$(nav).on('click', function(){
18		nav.removeClass('active');
19  	var $el = $(this),
20		id = $el.attr('href');
21 		$('html, body').animate({
22   		scrollTop: $(id).offset().top - headerH
23 		}, 500);
24		$(this).addClass('active');
25		if (winW < 880){
26			$('#menuWrap').next().hide();
27			$('#menuBtn').removeClass('close');
28		}
29 		return false;
30	});
31	
32	var timer = false;
33	$(window).bind('load resize',function(){	
34		if (timer !== false){clearTimeout(timer);}
35		timer = setTimeout(function(){
36			var
37				w = $(window).innerWidth(),
38				bg = $('.bg'),
39				bgH = bg.height();
40			
41			if(w > 800){
42				$(function(){		
43			  	$(".vMid").css('height', bgH);
44				});
45			}
46			else{
47				$(function(){		
48			  	$(".vMid").css({'height':'auto','padding':'50px 20px'});
49				});
50			}		
51		});
52	});
53	
54	$('.panel').hide();
55	$('#menuWrap').toggle(function(){
56		$(this).next().show();
57		$('#menuBtn').toggleClass('close');
58	},
59	function(){
60		$(this).next().hide();
61		$('#menuBtn').removeClass('close');
62	});
63		
64	$(window).on('scroll', function(){
65		var curPos = $(this).scrollTop();
66		if(curPos > 80){
67			$('#mainnav').addClass('changeNav');
68		}
69		else{
70			$('#mainnav').removeClass('changeNav');
71		}
72	});
73
74});

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.