last day (14 days later) » 

10:52 AM
0
A: How to completely hide bootstrap modal after getting ajax response

AbhishekUse this to clean the left background //when hidden $('#modal').on('hidden.bs.modal', function(e) { return this.render(); //DOM destroyer });

 
Where i have to put this code ... in my element or in ctp where element is rendered or after this $("#hcp_type_modal").modal('hide');
 
you can put it before start of ajax
 
As you suggest i place the code before ajax start.. before $.ajax() function but still the problem is there..
 
place it before hcp_btn.on('click', function(){
 
Not Working...Problem is still there
 
10:52 AM
what did you pasted?
 
as you told i place your code before hcp_btn.on('click', function(){ but this is not working.. modal close but transparent background still left
 
i am asking wat code you pasted, you have to change #modal according to your modal id so it would be #hcp_type_modal instead of #modal
 
Yes, i know about this i changed according to my modal id..but this is not working.
 
try $('#hcp_type_modal').on('hidden.bs.modal', function(e) { $('.modal-backdrop').remove(); });
 
I tried your new code .. but still nothing happens.. problem is still there...
 
11:09 AM
you can change modal-backdrop to class of the background you are having
 
where can i check for this class
 
do you know firebug
 
yes..
 
in that you can check
 
11:25 AM
okay .. i get.. and it worked...
 
12:16 PM
should i update the answer
 

last day (14 days later) »