Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

disable all controls in the page using jquery

Tags:

jquery

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.

like image 201
Prasad Avatar asked Dec 13 '22 01:12

Prasad


1 Answers

$("#id_button").attr("disabled","disabled");

or

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

or

$(":input").attr("disabled","disabled");
like image 182
Tommaso Taruffi Avatar answered Jan 22 '23 23:01

Tommaso Taruffi