[英]modals cross button is not working for mouse click
我在引导程序中有一个模态。 模态工作正常,但它的十字按钮对鼠标点击不起作用我的意思是如果我想关闭模态使用鼠标它的十字按钮不起作用。 对于键盘,我的意思是 ESC 按钮没问题。 任何人都可以帮助我吗?
我的模态代码:
<div class="modal fade" id="myModal" tabindex="-1" role="basic" aria-hidden="true">
<div class="modal-dialog" style="border-radius: 30px;">
<div class="modal-content help-popup" style="">
<div class="modal-header">
<h4 class="modal-title"> Login To Continue...</h4>
<span class="btn_close">
<i class="fa fa-times" aria-hidden="true"></i>
</span>
</div>
<div class="modal-body">
<div class="row side_pop">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="modal-body">
<div class="col-md-6">
@if(count($errors)>0)
<div class = "alert alert-error" style="color:red">
@foreach($errors->all() as $error)
<div class="alert alert-warning alert-block">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span></button>
<strong>{{ $error }}</strong>
</div>
@endforeach
</div>
@endif
@include('backend.layout.flash-message')
<fieldset>
{{ Form::open(['route' => 'login','class'=>'login-form']) }}
<div class="form-group">
<label class="control-label"
style=" font-weight: bold;">Email
ID</label>
{!! Form::email('email', null,['id' => 'email','class'=>'form-control','placeholder'=>'Email or Candidate Phone','autocomplete'=>'off','required']) !!}
@if ($errors->has('email'))
<span class="invalid-feedback" role="alert"
style="color:red">
<strong
style="color:red">{{ $errors->first('email') }}</strong>
</span>
@endif
</div>
<div class="form-group">
<label class="control-label"
style=" font-weight: bold;">Password</label>
{!! Form::password('password',['id' => 'password','class'=>'form-control','placeholder'=>'Password','autocomplete'=>'off','required']) !!}
@if ($errors->has('password'))
<span class="invalid-feedback" role="alert"
style="color:red">
<strong
style="color:red">{{ $errors->first('password') }}</strong>
</span>
@endif
</div>
<div class="form-actions">
<button type="submit"
class="btn btn-primary uppercase">Login
</button>
@if (Route::has('password.request'))
<a href="{{ route('password.request') }}"
id="forget-password"
class="forget-password" >Forgot
Password?</a>
@endif
</div>
{{ Form::close() }}
</fieldset>
</div>
我通过在模态的十字按钮中输入 data-dismiss="modal" 得到了解决方案。 现在按钮属性是
<span class="btn_close">
<i class="fa fa-times" aria-hidden="true" data-dismiss="modal"></i>
</span>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.