JSFiddle - React, Tailwind, and code Playground
HTML
<img id="image" src="http://farm3.static.flickr.com/2786/4199953283_3eb9def019.jpg" />
CSS
#image {
visibility: hidden;
}
JavaScript
// set-up an event on the browsers window
window.addEvents({
// be sure to fire the event once the document is fully loaded
load: function(){
// assing 'singleImage' variable to the image tag with the 'image' ID
var singleImage = $('image');
// set a bunch of CSS styles to the aforementioned image
singleImage.set('styles', {
'opacity': 0,
'visibility': 'visible'
});
// fade in the image
singleImage.set('tween', { duration: 5000 }).fade('in');
}
});