删除隐藏类后选择框大小

时间:2016-02-29 07:36:25

标签: jquery twitter-bootstrap

先生,先生,请先检查我的剧本......



<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>

 
 <label onclick="$('#asd').hide();" class="btn btn-info active ">
   <input type="radio" checked = 'checked' value="RM" id="posisi1" name="posisi"> RM
 </label>


<label  onclick="$('#asd').show();$('#asd').removeClass('hidden')" class="btn btn-info ">
     <input type="radio" value="Chief"  id="position2" name="posisi" > Chief
 </label>

<div class="form-group hidden" id = "asd">
                    <label class="col-sm-3 control-label">Pilih RM / Chief</label>
                    <div class="col-sm-8">
                    <select class="form-control select2" name="parent">
                    <option value="none">None</option>
                                        	
                      <option  value="120442130008">CHOIRUL ILYAS</option>
                                        	
                      <option  value="1502017">CHOIRUL ILYAS</option>
                                        	
                      <option  value="120442130009">Boby Kurniawan</option>
                    </select>
                     </div>
 </div>
&#13;
&#13;
&#13;

当我在我的电脑(本地)上运行时。所选框的大小很小。但是,当我通过&#39;运行代码片段&#39;大小是正常的。有什么错吗?

Here Is my Screenshot

当我使用此

时,我认为我的问题
hidden{
       display:none;
    }

1 个答案:

答案 0 :(得分:0)

我认为你需要的是这样的东西

lsusermaster

JSFiddle from your code - updated