We can use the fade to method to fade objects to a specified opacity.
This example demonstrates how the effect will look.
Here we have four divs shaped as blue squares.
When we clicked the fade button each div fades to a lower opacity the opacity setting is different for
each square.
Let's take a look at the script to see how this how to apply this effect.
Using J query will do the demonstration one more time
now looking at the script.
We can see we've we've applied the fade to method as the event for each div defeat to method allows
two parameters.
The first is the duration of time it takes for the opacity to reduce or increase to the specified amount.
The second value is the desired opacity.
In this case we've set the time interval to one second or 1000 milliseconds
the opacity increases in increments of 20.
For each div starting at 20 percent and ending it 80 percent.