I'd like to show that a div is disabled not only by disabling the form controls but also by dimming out the div itself.
How can I do this?
You can reduce the opacity of the element with fadeTo, for example
$('#a_div').fadeTo('slow',.3);
The first argument is the speed. You can supply it in milliseconds, or the strings 'slow' or 'fast', which are 600ms and 200ms respectively. Any other string is interpreted as 400ms.
The second argument is the final opacity. 0 is fully transparent (invisible), 1 is fully opaque.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With