tags:

views:

544

answers:

3

Indicates to user that it's not editable

A: 
$("input").attr("disabled", true);
peirix
Depending on which DOCTYPE he's using, it should not be correct, use 'disabled=disabled' with xhtml 1.0
Boris Guéry
what's the effect of disabling img?
Shore
try it!!!!! !
redsquare
@redsquare ,tried, the "disabled" attribute has no effect to img:(
Shore
+2  A: 
$('#elementId').attr('disabled', 'disabled')
redsquare
$('#elementId').attr('disabled', 'disabled')or $('#elementId').attr('disabled', true)which is right?
Shore
mine is correct
redsquare
$('img').attr('disabled', 'disabled'),what's the effect of disabling img?
Shore
Seems no effect on img,right?
Shore
correct, better to make the image opaque I would think, what do you want to do?
redsquare
how can an image be editable.....unless your using a resizer/clip plugin
redsquare
I want to make the img look un-editable,disabled.opaque,how?
Shore
yes,I mean to resize/clip by editable:)
Shore
$('#imageId').fadeTo('slow', 0.2) for example-
redsquare
is fadeTo a built-in function of jQuery?
Shore
yes it is http://docs.jquery.com/Effects/fadeTo
redsquare
perfect answer!
Shore
A: 

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

TheVillageIdiot