PageSourceSearch

https://www.dengamleby.dk/scripts/jquery/ajrselect.js

js dengamleby.dk collected 2026-10-02 05:54:29 UTC 1,921 bytes, 78 lines download raw bytes

1$(function(){
2
3	initAjrSelect();
4	
5	$(document).on('click','.dd > label',function(){
6	
7		$(this).removeClass('alert');
8	
9		if($(this).parent().find('ul').is(':visible')){
10
11			$(this).parent().find('ul').hide();
12			$(this).parent().removeClass('clicked');
13		
14		} else {
15
16			$('.clicked').removeClass('clicked');
17			$('.dd ul').hide();
18			$(this).parent().addClass('clicked');
19			$(this).parent().find('ul').fadeToggle();	
20		
21		};
22	});
23
24	$(document).on('click','.dd li',function(){
25		$(this).parent().find('.True').removeClass('True');
26		$(this).addClass('True');
27		
28		if($(this).parent().parent().find('input').val() != $(this).attr('value')){
29			$(this).parent().parent().find('input').val($(this).attr('value'));
30			if($(this).closest('form').attr('action')){
31				$(this).closest('form').submit();
32			}
33		}
34		
35		$(this).parent().parent().find('label').html($(this).html()).click();	
36
37	});
38	
39	$(document).on('click','.context-menu > label',function(){
40	
41		if($(this).parent().find('ul').is(':visible')){
42		
43			$(this).parent().removeClass('clicked');
44			
45		} else {
46		
47			$('.context-menu ul').hide();
48
49			$('.clicked').removeClass('clicked');
50			
51			$('.dd ul').hide();
52			
53			$(this).parent().addClass('clicked');
54			$(this).parent().find('ul').fadeToggle();	
55			
56		};
57	});
58	
59});
60
61
62function initAjrSelect(){
63
64    $('.dd').each(function(){
65
66      if( $(this).find('input[type=hidden]').length > 0 && $(this).find('input[type=hidden]').val() != '' ){
67        $(this).find('li[value="'+$(this).find('input[type=hidden]').val()+'"]').addClass('True');
68      } else if( $(this).find('li.True').length == 0 ){
69        $(this).find('li:first-child').addClass('True');	
70
71      }
72
73      $(this).find('input[type=hidden]').val( $(this).find('li.True').attr('value') );
74      $(this).find('label').html( $(this).find('li.True').text() );
75
76    });
77	
78}

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.