Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
13
rated 0 times [  15] [ 2]  / answers: 1 / hits: 18489  / 14 Years ago, wed, september 22, 2010, 12:00:00


I have a div which is creating through ajax, i would like to disable the whole body once the div is popup and until, unless the div is closed.
Is this possible in jquery. Please let me know your suggestion



Thanks,
Praveen Jayapal


More From » jquery

 Answers
5

You want to REMOVE, or hide the body? Technically this shouldn't be possible because you need to append the div to the body in order to see it. What you could do is create a 'mask' layer that covers the WHOLE body, then use z-index for your div to display it on top of the body.



Something like:



http://www.queness.com/post/77/simple-jquery-modal-window-tutorial



might help!



To completely hide the page all you would need to do is change line 21:



$('#mask').fadeTo(slow,0.8);



in the javascript to:



$('#mask').fadeTo(slow,1);



and the color of the mask on line 7 of the CSS can be changed to whatever you want too:



background-color: #000;


[#95544] Sunday, September 19, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
samaraanandah

Total Points: 94
Total Questions: 86
Total Answers: 99

Location: Montenegro
Member since Thu, Jun 16, 2022
2 Years ago
;