html - Bootstrap modal backdrop remains after closing modal -


i'm following w3school tutorial http://www.w3schools.com/bootstrap/bootstrap_modal.asp add modal in html page.

there no problem in displaying modal. when close modal, screen greyed out , inaccessible few seconds. after that, screen responsive again. , happens first time when page launched.

i have tried following:

<button type="button" class="btn btn-default" data-dismiss="modal" data-backdrop="false">close</button> 

but not remove grey out. have no idea how fixed it. please me! in advance!

edited: section can clicked:

<a data-toggle="modal" data-target="#tt-modal">     <div id="tt">         <div class="desc_hidden">              <div class="title"> product name </div>              <div class="subtitle"> description </div>              <div class="view">view project</div>        </div>     </div> </a> 

so, following modal display after clicking above section:

<div id="tt-modal" class="modal" role="dialog">     <div class="modal-dialog modal-lg">         <div class="modal-content">             <div class="modal-header">                 <button type="button" class="close" data-dismiss="modal" data-backdrop="false">&times;</button>             </div>             <!-- information here -->             <div class="modal-footer">                 <button type="button" class="btn btn-default" data-dismiss="modal" data-backdrop="false">close</button>             </div>           </div>     </div> <div> 

try 1 :

$('#your-modal-id').modal('hide'); $('body').removeclass('modal-open'); $('.modal-backdrop').remove(); 

good luck.

i tested modal,it worked out problem. there tiny problems there,you don't need define data-backdrop="false" attribute in header's , footer's button,instead set attribute trigger modal button.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -