PageSourceSearch

https://fieldsofhonor-database.com/js/forms/inputs.btnselect-text.js?v=6.1.6

js fieldsofhonor-database.com collected 2026-09-26 07:12:23 UTC 1,179 bytes, 37 lines download raw bytes

1$.initDynamicFormBtnselectText = function(dom_root) {
2	dom_root.find('div.input-group-btn-with-select:not(.jsinit):not(.protectFromDynamic)').each(function() {
3		const $this = $(this);
4		const $input = $this.find('input');
5		const $options = $this.find('ul.dropdown-menu li');
6		const $title = $this.find('span.title');
7
8		$this.addClass('jsinit');
9
10		$options.each(function() {
11			const $optionLink = $(this).find('a');
12			$optionLink.on('click', function() {
13				const dataId = $optionLink.attr('data-id');
14				$input.val(dataId);
15				$title.html($optionLink.attr('data-title'));
16				$options.each(function() {
17					const $link = $(this).find('a');
18					const linkId = $link.attr('data-id');
19					$link.html(linkId === dataId
20						? `${$link.attr('data-title')}<i class="far fa-check float-right"></i>`
21						: $link.attr('data-title')
22					);
23				});
24			});
25		});
26
27		const triggerOptionClick = () => {
28			const value = $input.val();
29			const $targetOption = value ? $options.find(`a[data-id='${value}']`) : $options.first().find('a');
30			$targetOption.click();
31		};
32
33		triggerOptionClick();
34
35		$input.addClass('needsChangeTriggered').on('change', triggerOptionClick);
36	});
37}

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.