1jQuery(function($){ 2 3 // Common 4 var select_root = $('div.dcCombiSelect'); 5 var select_value = $('.myValue'); 6 var select_a = $('div.dcCombiSelect>ul>li>a'); 7 var select_input = $('div.dcCombiSelect>ul>li>input[type=radio]'); 8 var select_label = $('div.dcCombiSelect>ul>li>label'); 9 10 // Radio Default Value 11 $('div.myValue').each(function(){ 12 var default_value = $(this).next('.iList').find('input[checked]').next('label').text(); 13 $(this).append(default_value); 14 }); 15 16 // Line 17 select_value.bind('focusin',function(){$(this).addClass('outLine');}); 18 select_value.bind('focusout',function(){$(this).removeClass('outLine');}); 19 select_input.bind('focusin',function(){$(this).parents('div.dcCombiSelect').children('div.myValue').addClass('outLine');}); 20 select_input.bind('focusout',function(){$(this).parents('div.dcCombiSelect').children('div.myValue').removeClass('outLine');}); 21 22 // Show 23 function show_option(){ 24 $(this).parents('div.dcCombiSelect:first').toggleClass('open'); 25 } 26 27 // Hover 28 function i_hover(){ 29 $(this).parents('ul:first').children('li').removeClass('hover'); 30 $(this).parents('li:first').toggleClass('hover'); 31 } 32 33 // Hide 34 function hide_option(){ 35 var t = $(this); 36 setTimeout(function(){ 37 t.parents('div.dcCombiSelect:first').removeClass('open'); 38 }, 1); 39 } 40 41 // Set Input 42 function set_label(){ 43 var v = $(this).next('label').text(); 44 $(this).parents('ul:first').prev('.myValue').text('').append(v); 45 $(this).parents('ul:first').prev('.myValue').addClass('selected'); 46 } 47 48 // Set Anchor 49 function set_anchor(){ 50 var v = $(this).text(); 51 $(this).parents('ul:first').prev('.myValue').text('').append(v); 52 $(this).parents('ul:first').prev('.myValue').addClass('selected'); 53 } 54 55 // Anchor Focus Out 56 $('*:not("div.dcCombiSelect a")').focus(function(){ 57 $('.aList').parent('.dcCombiSelect').removeClass('open'); 58 }); 59 60 select_value.click(show_option); 61 select_root.removeClass('open'); 62 select_root.mouseleave(function(){$(this).removeClass('open');});
63 select_a.click(set_anchor).click(hide_option).focus(i_hover).hover(i_hover); 64 select_input.change(set_label).focus(set_label); 65 select_label.hover(i_hover).click(hide_option); 66 67 // Form Reset 68 $('input[type="reset"], button[type="reset"]').click(function(){ 69 $(this).parents('form:first').find('.myValue').each(function(){ 70 var origin = $(this).next('ul:first').find('li:first label').text(); 71 $(this).text(origin).removeClass('selected'); 72 }); 73 }); 74 75});
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.