jquery - show div on focus in and allow user to use option buttons -


i have html form in table allows user search or enter new details staff. show div when select input box. can using

<td><input type="text" name="team" id="team" size="23" maxlength="4"   onfocus="document.getelementbyid('show_teams').style.display='block';" onblur="document.getelementbyid('show_teams').style.display='none';"> </td> 

however user try's click option box inside div closes ( due onblur display none ) have dabled jquery , think way go can't find solution.

the basic idea on selecting (focus) "team" text box div show 2 option , 3 drop down boxes. once selected correct code shift pattern placed in text box cicked, , div hide. thanks

i have should example,

$('.mydiv').hide();      $('#test1').focus(function(){     $('.mydiv').show(); });  $('#my_select').change(function(){     $('#test1').val($(this).val());     $('.mydiv').hide();     }); 

fiddle

change html code in div accordingly, should out.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -