html - Disable all div contents using jquery including anchor, paragraph tags? -


this question has answer here:

i need little in html css, want disable contents in div having class "main-wrapper" after user clicks on logout button through jquery function, tried in 2 ways, in vain! here jquery function,

function loadlogoutbox() {     $('#logout_box').fadein("slow");     $(".main-wrapper").css({ // style             "opacity": "0.3"       });     $(".main-wrapper").disable();     $(".top-menu").attr('disabled', true);  } 

any please!

if understand correctly, can create div takes 100% width , height transparent background , have appear above main wrapper , below logout box.

html:

<div id="cover"></div> 

css:

#cover {   position: absolute;   height: 100%;   width: 100%;   z-index: 1; /* make sure logout_box has z-index of 2 */   background-color: none;   display: none; } 

jquery:

function loadlogoutbox() {     $("#cover").css("display", "block");     $('#logout_box').fadein("slow");     $(".main-wrapper").css({ // style             "opacity": "0.3"       }); } 

with method, have add jquery take away cover once user returns main screen.

this can done by:

$("#cover").css("display", "none"); 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -