show select options with jquery on demand -


i have hidden selects , want show options when clickin in previous div fakeinput class

this how i'm trying:

$('body').on('click','.fakeinput',function(){     console.log(true);     $(this).next('select').show().click();  }); $('body').on('blur','select',function(){     $(this).hide(); }); 

but hide/show select item, wont show select's options

what missing here?

-edit-

fiddle: http://jsfiddle.net/qaayd/2/

i'm not sure best solution, when had similar problem gave select size attribute made open, , gave position: absolute "float" above else.

$(this).next('select').attr('size',     $(this).next('select').find('option').length)        .show(); 

demo


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -