gerardchicken
New Member
3 radio buttons and a single select box on the page. clicking on first radio button then in select box it will show contents related to first radio button ,respectively...selecting first radio button its working fine ,when i am selecting second radio button ,the select box height is decreasing ,cant able to visible at all ,third also same ,its happening in chrome ,FF its working finemy code\[code\] <label><input type="radio" name="reward-venue" value="http://stackoverflow.com/questions/13700438/Fly" checked /><div class="radio-icon Fly-sprite"></div></label> <label><input type="radio" name="reward-venue" value="http://stackoverflow.com/questions/13700438/Drive" /><div class="radio-icon Drive-sprite"></div></label> <label><input type="radio" name="reward-venue" value="http://stackoverflow.com/questions/13700438/Stay" /><div class="radio-icon Stay-sprite"></div></label> <div> Reward program <select name="program"> <option value=""> - select one - </option> {{#fly_programs}} <optgroup label="Fly"> {{#reward_program}} <option value="http://stackoverflow.com/questions/13700438/{{reward_program_id}}">{{name}}</option> {{/reward_program}} </optgroup> {{/fly_programs}} {{#drive_programs}} <optgroup label="Drive"> {{#reward_program}} <option value="http://stackoverflow.com/questions/13700438/{{reward_program_id}}">{{name}}</option> {{/reward_program}} </optgroup> {{/drive_programs}} {{#stay_programs}} <optgroup label="Stay"> {{#reward_program}} <option value="http://stackoverflow.com/questions/13700438/{{reward_program_id}}">{{name}}</option> {{/reward_program}} </optgroup> {{/stay_programs}} </select> </div>\[/code\]js for hiding and showing \[code\] var show_optgroup = $('optgroup[label=' + venue_name + ']') , hide_optgroup = $('optgroup[label!=' + venue_name + ']') ; show_optgroup.show(); show_optgroup.children('option').show(); hide_optgroup.hide(); hide_optgroup.children('option').hide(); this.$el.find('option:selected').removeAttr('selected'); this.$el.find('option:first').attr('selected', 'selected'); $.uniform.update(); return this; },\[/code\]