Reputation: 6762
I know this is very common question. I have to post it after researching solution on google alot. I am trying to open a Dialog with JqueryUI. I am trying to block background screen on opening dialog. I can get the dialog but I am unable to do the blocking background screen event after trying below scenarios:
what would be my code issue.
$("#divDialog").dialog({
modal: true
});
Any work around to fix the issue?
Upvotes: 2
Views: 4450
Reputation: 1075
This seems to work for me here: http://jsfiddle.net/Nd5w9/
The HTML:
<body>
<button>Can't click when dialog shown</button>
<div id="divDialog">Hi hi ih</div>
</body>
And the Javascript:
$("#divDialog").dialog({
modal: true
});
When the dialog is shown, I can't click on the button. Are you sure the elements are being styled properly?
Upvotes: 2