PageSourceSearch

https://www.city.takaoka.toyama.jp/theme/base/js/jquery_dropmenu.js

js city.takaoka.toyama.jp collected 2026-10-02 04:57:32 UTC 2,224 bytes, 99 lines download raw bytes

1	/*
2	* ドロップメニュ
3	  必須ライブラリ:eqGroupHeight
4	*/
5	$.fn.dropMenu = function(config) {
6		config = jQuery.extend({
7			col: 1,
8			speed: 0,
9		},config);
10		var target = this;
11		
12		if(target.size() == 0) {
13			return;
14		}
15		
16		var lies = target.find('.list li');
17		var divs = target.find('.list .dropmenu');
18		var notA = $('a').not(target.find('a'));
19		
20		var z = 0;
21		
22		var show = function() {
23			var a = $(this);
24			divs.hide();
25			a.data('div').fadeIn(config.speed ,function() {
26				target.find(".list2").eqGroupHeight(2);
27			});
28			// ie8はabsoluteしたliは親要素が透明化しても透明化されないので自身も透明化
29			a.data('lies').hide();
30			// a.data('lies').fadeIn(150);
31			// 上記のeqGroupHeightが間に合わないので時間短めにする(liの高さが0になる)
32			a.data('lies').slideDown(config.speed);
33			
34			z++;
35			a.data('li').css('z-index', z);
36			
37			target.find(".list2").css('top', target.height() + 'px');
38		};
39		var hide = function() {
40			divs.fadeOut(config.speed, function() {
41				$("#header-nav .list2 li").css('height', 'auto');
42			});
43			var a = $(this);
44			if(a.data('lies')) {
45				a.data('lies').slideUp(config.speed);
46			}
47		};
48		
49		var targetR = target.offset().left + target.width();
50		lies.each(function(){
51			var li = $(this);
52			var div = li.find('.dropmenu');
53			var lies = li.find('.list2 li');
54			var a = li.find('> a');
55			
56			if(div.size() == 0) {
57				return true;
58			}
59			
60			var aFocusShow = function() {
61				$(this).addClass('focus');
62			}
63			var aFocusHide = function() {
64				$(this).removeClass('focus');
65			}
66			div.find('a').each(function() {
67				var a = $(this);
68				a.focusin(aFocusShow);
69				a.focusout(aFocusHide);
70				a.hover(aFocusShow, aFocusHide);
71			});
72			
73			div.show();//計算するため
74			var divR = div.offset().left + div.width();
75			if(targetR < divR) {
76				div.addClass('R');
77			}
78			div.hide();
79			
80			li.data('a', a);
81			li.data('div', div);
82			li.data('lies', lies);
83			li.data('li', li);
84			a.data('a', a);
85			a.data('div', div);
86			a.data('lies', lies);
87			a.data('li', li);
88
89			if(div.find('a').size() > 0) {
90				a.focus(show);
91				li.hover(show, hide);
92				notA.focus(hide);
93			}
94
95		});
96	};
97	
98	
99

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.