bootstrap 3.Modal在远程模式下工作。使用jquery的输入浮动标签在远程Modal中不起作用
的index.html
<div class="loginButton col-md-auto col-lg-auto hidden-sm hidden-xs" type="button" data-toggle="modal" data-target="#login"></div>
<div class="modal fade bs-example-modal-lg" id="login" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-remote="login.html" aria-hidden="true">
<div class="modal-xxlg" role="document">
<div class="modal-content loginContainer">
</div>
</div>
</div>
的login.html
<div class="modal-header">
<div class="row">
<h4 class="modal-title " id="myModalLabel">User Login</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
</div>
</div>
<div class="modal-body">
<section class="login-container row">
<div class="login col-sm-12 col-md-12 col-lg-6">
<div class="boxed">
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="agent">
<form role="form">
<div class="form-group float-label-control col-sm-4 ">
<label for="">Maximum Count</label>
<input type="text" class="form-control" placeholder="Maximum Count">
</div>
</form>
</div>
<div role="tabpane2" class="tab-pane" id="customer">
<p>weterter</p>
</div>
</div>
</div>
</div>
</section>
</div>
<div class="modal-footer">
</div>
使用浮动标签引用link
答案 0 :(得分:0)
你缺少两件事。您的输入必须包含empty
课程,label
必须在input
之后:
<div class="modal-header">
<div class="row">
<h4 class="modal-title " id="myModalLabel">User Login</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
</div>
</div>
<div class="modal-body">
<section class="login-container row">
<div class="login col-sm-12 col-md-12 col-lg-6">
<div class="boxed">
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="agent">
<form role="form">
<div class="form-group float-label-control col-sm-4 ">
<input type="text" class="form-control empty" placeholder="Maximum Count">
<label for="">Maximum Count</label>
</div>
</form>
</div>
<div role="tabpane2" class="tab-pane" id="customer">
<p>weterter</p>
</div>
</div>
</div>
</div>
</section>
</div>
<div class="modal-footer">
</div>
&#13;