On opening a dialog I want to make the rest of the body readonly/unselectable. I'm using jquery. Currently I'm using this, but it doesnt work:
<script>
$('document').ready(function() {
$('#advertMenu').click(function() {
$("body").attr("readonly", "readonly");
});
});
</script>
After Edit
$("body").css("-moz-user-select", "-moz-none");
$("body").css("-khtml-user-select", "none");
$("body").css("-webkit-user-select", "none");
$("body").css("-o-user-select", "none");
$("body").css("-user-select", "none");