tags:

views:

107

answers:

3

How to disable all the controls(buttons, anchor, textbox,...) in the page using jquery. I need this to show a preview of a page, in which i don't want to the user to click anything.

A: 

This may work:

$(document).click(function(evt){ evt.preventDefault; });
Darrell Brogdon
A: 

The best way will be to show a div on top of all other elements. Make the stacking order of this div to be the highest in the document so that click won't be made on any other elements.

Specifying the stack level: the 'z-index' property

rahul
its not disabling the input elements..
Prasad
If you need to make a modal popup then I think this is the right way to do it.
rahul
A: 
$("#id_button").attr("disabled","disabled");

or

$(".class_buttons").attr("disabled","disabled");

or

$(":input").attr("disabled","disabled");
tommaso