We can change the opacity to a different value by using fadeTo() in jQuery
To fadeTo on click of a button here is the code.
$('#b2').click(function(){
$('#d1').fadeTo('fast',0.5);
})
Restoring Opacity
We can restore opacity by changing the value to 1.0
$('#b2').click(function(){
$('#d1').fadeTo('fast',1.0);
})
Adding speed to transition
We can add choice to transition effect. The choice are
Slow
Fast
Milli seconds
$('#d1').fadeTo('slow',0.3);
These effects add speed to the transition effects.