PageSourceSearch

https://exacq.com/resources/jquery/jquery.dropdown.js

js exacq.com collected 2026-10-01 14:04:12 UTC 931 bytes, 48 lines download raw bytes

1(function ($) {
2
3	$.fn.dropdown = function (options) {
4	
5		var settings = $.extend({
6		
7			width: 50,
8			height: 90
9		}, options);
10	
11		var $el = this;
12		var $selected = $el.children(".ls-selected");
13		var $list = $el.children(".ls-list");
14		
15		$list.height(settings.height);
16		$list.width(settings.width);
17		
18		/**
19			Toggle the list container every time the dropdown box has been clicked.
20		*/
21		$el.on("click", function (e) {
22		
23			e.stopPropagation();
24		
25			$list.toggle();
26		});
27		
28		/**
29			When a list item is clicked, put it in the selected section.
30		*/
31		$el.on("click", ".ls-list .ls-item", function (e) {
32				
33			var html = $(this).clone();
34			
35			$selected.html(html);
36			
37			$(this).parents(".exacq-dropdown").trigger("change");
38		});
39		
40		$("html, body").on("click", function () {
41		
42			if ($list.is(":visible")) $list.hide();
43		});
44		
45		return this;
46	};
47	
48} (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.