I am trying to block the background with my two jquery modal dialogs until the user closes the window. Any idea on how to achieve this?
By "blocking the background" I mean disabling the other elements on the page (i.e. making other elements unclickable).
Here is my code below:
// sign up dialog
$( "#aboutus_dialog" ).dialog({
autoOpen: false,
show: "fadein",
hide: "fadeout"
});
// sign up dialog
$( "#signup_dialog" ).dialog({
autoOpen: false,
show: "fadein",
hide: "fadeout"
});
// about us modal
$('#aboutus').click(function() {
modal: true,
$("#aboutus_dialog").dialog("open");
return false;
});
// about us modal
$('#signup').click(function() {
$("#signup_dialog").dialog("open");
return false;
});
});
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…