jquery - Close bootstrap modal if the button is not placed inside modal-body -
so, have modal i'm using full screen menu , close button working in form:
<div class="modal fade" id="hidden-links"> <div class="modal-dialog"> <div class="modal-content hidden-links"> <div class="modal-body"> <div data-dismiss="modal" aria-label="close"> <i class="fa fa-times fa-fw fa-2x"></i> </div> <ul class="links-hidden" role="menu"> <!--hidden links here--> </ul> </div> </div> </div> </div>
what i'm trying move:
<div data-dismiss="modal" aria-label="close"> <i class="fa fa-times fa-fw fa-2x"></i> </div>
out of .modal-body
can achieve this:
i've done digging couldn't find proper solution problem, ideas?
change markup slightly:
<div class="modal fade" id="hidden-links"> <div data-dismiss="modal" aria-label="close"> <i class="fa fa-times fa-fw fa-2x"></i> </div> <div class="modal-dialog"> <div class="modal-content hidden-links"> <div class="modal-body"> <ul class="links-hidden" role="menu"> <!--hidden links here--> </ul> </div> </div> </div> </div>
and add come css:
div[data-dismiss="modal"]{ color:#ffffff; position:fixed; top:10px; right:20px; cursor:pointer; }
Comments
Post a Comment