Code: Select all
<script type="text/javascript">
$(document).ready(function () {
jQuery.fn.extend({
disableSelection: function () {
this.each(function () {
this.onselectstart = function () { return false; };
this.unselectable = "on";
jQuery(this).css('-moz-user-select', 'none');
});
}
});
});
window.document.oncontextmenu = new Function("return false");
$(document).ready(function () {
if ($("html, body").live) {
$("html, body").live("contextmenu", function (e) {
return false;
});
$("html, body").live("mouseover", function (e) {
$(this).disableSelection()
});
$("#commentarioProfessor").live("contextmenu", function () {
return true;
});
} else {
$("html, body").bind("contextmenu", function (e) {
return false;
});
$("html, body").bind("mouseover", function (e) {
$(this).disableSelection()
});
$("#commentarioProfessor").bind("contextmenu", function () {
return true;
});
}
});
</script>