Disable div in jquery with shading

I would like to show that the div is disabled not only by disabling form controls, but also by decreasing the div itself.

How can i do this?

+4
source share
1 answer

You can reduce the opacity of the fadeTo element, for example

$('#a_div').fadeTo('slow',.3); 

The first argument is speed. You can put it in milliseconds, or the lines are "slow" or "fast", which are respectively 600 and 200 ms. Any other line is interpreted as 400 ms.

The second argument is the final opacity. 0 completely transparent (invisible), 1 completely opaque.

+8
source

All Articles