Using the Fade Method
Once the object is imported, we can simply call its fade method and pass the correct parameters. It’s really that easy:
<img src="images/dscf0298.jpg" id="img1" border="0" onload="Effects.fade(’img1’, 0, 100, 1000, ’Effects.onFaded()’);" />
When the image loads, we simply fire the fade method, passing the ID, the starting and ending opacity percentages, the duration as milliseconds, and (optionally) the callback method. It doesn’t get much easier than that.