1. Put the following code in your js file inside a document ready call:
3. HTML markcup looks like this (for image). You can use other elements other than images, but beware the responsive issues noted below:
4. Include the following styles in your css. Note the caveats for making the fader responsive: