PageSourceSearch

https://theartofannihilation.com/wp-content/themes/goodspace/javascript/superfish.js?ver=1.0

js theartofannihilation.com collected 2026-10-02 05:47:27 UTC 3,544 bytes, 115 lines download raw bytes

1
2/*
3 * Superfish v1.4.8 - jQuery menu widget
4 * Copyright (c) 2008 Joel Birch
5 *
6 * Dual licensed under the MIT and GPL licenses:
7 * 	http://www.opensource.org/licenses/mit-license.php
8 * 	http://www.gnu.org/licenses/gpl.html
9 *
10 * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
11 */
12
13;(function($){
14	$.fn.superfish = function(op){
15
16		var sf = $.fn.superfish,
17			c = sf.c,
18			$arrow = $(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),
19			over = function(){
20				var $$ = $(this), menu = getMenu($$);
21				clearTimeout(menu.sfTimer);
22				$$.showSuperfishUl().siblings().hideSuperfishUl();
23			},
24			out = function(){
25				var $$ = $(this), menu = getMenu($$), o = sf.op;
26				clearTimeout(menu.sfTimer);
27				menu.sfTimer=setTimeout(function(){
28					o.retainPath=($.inArray($$[0],o.$path)>-1);
29					$$.hideSuperfishUl();
30					if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}
31				},o.delay);	
32			},
33			getMenu = function($menu){
34				var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
35				sf.op = sf.o[menu.serial];
36				return menu;
37			},
38			addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };
39			
40		return this.each(function() {
41			var s = this.serial = sf.o.length;
42			var o = $.extend({},sf.defaults,op);
43			o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){
44				$(this).addClass([o.hoverClass,c.bcClass].join(' '))
45					.filter('li:has(ul)').removeClass(o.pathClass);
46			});
47			sf.o[s] = sf.op = o;
48			
49			$('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {
50				if (o.autoArrows) addArrow( $('>a:first-child',this) );
51			})
52			.not('.'+c.bcClass)
53				.hideSuperfishUl();
54			
55			var $a = $('a',this);
56			$a.each(function(i){
57				var $li = $a.eq(i).parents('li');
58				$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
59			});
60			o.onInit.call(this);
61			
62		}).each(function() {
63			var menuClasses = [c.menuClass];
64			if (sf.op.dropShadows) menuClasses.push(c.shadowClass);
65			$(this).addClass(menuClasses.join(' '));
66		});
67	};
68
69	var sf = $.fn.superfish;
70	sf.o = [];
71	sf.op = {};
72	sf.c = {
73		bcClass     : 'sf-breadcrumb',
74		menuClass   : 'sf-js-enabled',
75		anchorClass : 'sf-with-ul',
76		arrowClass  : 'sf-sub-indicator',
77		shadowClass : 'sf-shadow'
78	};
79	sf.defaults = {
80		hoverClass	: 'sfHover',
81		pathClass	: 'overideThisToUse',
82		pathLevels	: 1,
83		delay		: 200,
84		animation	: {opacity:'show'},
85		speed		: 'fast',
86		autoArrows	: true,
87		dropShadows : true,
88		disableHI	: false,		// true disables hoverIntent detection
89		onInit		: function(){}, // callback functions
90		onBeforeShow: function(){},
91		onShow		: function(){},
92		onHide		: function(){}
93	};
94	$.fn.extend({
95		hideSuperfishUl : function(){
96			var o = sf.op,
97				not = (o.retainPath===true) ? o.$path : '';
98			o.retainPath = false;
99			var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
100					.find('>ul').hide().css('visibility','hidden');
101			o.onHide.call($ul);
102			return this;
103		},
104		showSuperfishUl : function(){
105			var o = sf.op,
106				sh = sf.c.shadowClass+'-off',
107				$ul = this.addClass(o.hoverClass)
108					.find('>ul:hidden').css('visibility','visible');
109			o.onBeforeShow.call($ul);
110			$ul.animate(o.animation,o.speed,function(){ o.onShow.call($ul); });
111			return this;
112		}
113	});
114
115})(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.