html - Disable all div contents using jquery including anchor, paragraph tags? -
this question has answer here:
- how disable div content 21 answers
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
Post a Comment