Simple Image Effects
JavaScript can be used to add instant effects to your webpage images. The following effects, when applied, have a default look. That default look can be modified. The following exercises are based off free image effects found at:
glossy.js
A very easy script to implement. By default, this script adds rounded corners, a drop shadow and a glossy look to an image. This image effect, including instructions and file downloads can be found at:

glossy.js
Glossy.js is a very easy JavaScript effect to integrate into your webpage. By default, the script adds rounded corners, drop shadow and a glossy look to your image. This image effect, including instructions for use and file downloads can be found at:
In Adobe Bridge:
- Locate and select fx-1.jpg in the ‘site-working’ folder
- Right-click and choose open with Photoshop
In Adobe Photoshop:
- From the Menu Bar, go to Image > Image Size
- Set the image width value to 408 pixels
- Set the interpolation to Bicubic Sharper
- From the Menu Bar, go to View > Actual Pixels
- From the Menu Bar, go to File > Save for Web & Devices...
- Set the save preset to JPEG High (quality of 60)
- Save the file into the ‘site-media’ folder
- Close the fx-1.jpg file – do NOT save
In Adobe Dreamweaver:
- Open simple-fx.html
- Working in Design View
- Replace the page left image with fx-1.jpg from the ‘site-media’ folder
- Be sure the image is not scaled in the Properties Panel
To access the glossy.js functionality:
- Switch to Code View
- Make room the <head> section to add a link to an external .js file
- From the Menu Bar, Insert > HTML > Script Objects > Script
- Link to the external .js file: site-javascript/glossy/glossy.js
To add the glossy.js effect:
- Working in Design View
- Select the fx-1.jpg image
- Switch to Code View
- Within the fx-1.jpg image tag, add class="glossy"
- Save your file
- From the Menu Bar, File > Preview in Browser > Firefox
To modify the default look:
- For a different look, change to class="glossy noshadow"
- Save your file
- Refresh your Firefox page
- For yet another different look, class="glossy iradius40"
- Save your file
- Refresh your Firefox page
So where did this stuff come from?
instant.js
Instant.js is another easy script to implement. By default, this script adds a white border, drop shadow and tilt to your image. This image effect, including instructions for use and file downloads can be found at:

In Adobe Bridge:
- Locate and select fx-2.jpg in the ‘site-working’ folder
- Right-click and choose open with Photoshop
In Adobe Photoshop:
- From the Menu Bar, go to Image > Image Size
- Set the image width value to 408 pixels
- Set the interpolation to Bicubic Sharper
- From the Menu Bar, go to View > Actual Pixels
- From the Menu Bar, go to File > Save for Web & Devices...
- Set the save preset to JPEG High (quality of 60)
- Save the file into the ‘site-media’ folder
- Close the fx-2.jpg file – do NOT save
In Adobe Dreamweaver:
- Working in Design View
- Replace the page right image with fx-2.jpg from the ‘site-media’ folder
- Be sure the image is not scaled in the Properties Panel
To access the instant.js functionality:
- Switch to Code View
- Make room the <head> section to add a link to an external .js file
- From the Menu Bar, Insert > HTML > Script Objects > Script
- Link to the external .js file: site-javascript/instant/instant.js
To add the instant.js effect:
- Working in Design View
- Select the fx-2.jpg image
- Switch to Code View
- Within the fx-2.jpg image tag, add class="instant"
- Save your file
- From the Menu Bar, File > Preview in Browser > Firefox
To modify the default look:
- For a different look, change to class="instant historical"
- Save your file
- Refresh your Firefox page
- For yet another different look, class="instant icolor002748"
- Save your file
- Refresh your Firefox page
- For yet another different look, class="instant itiltnone"
- Save your file
- Refresh your Firefox page
To add a Caption based on the alt attribute
- Working in Design View
- Select the fx-2.jpg image
- Give the fx-2.jpg a short 'alt' in the Properties Panel
- Switch to Code View
- Make room the <head> section to add a link to a second external .js file
- From the Menu Bar, Insert > HTML > Script Objects > Script
- Link to the external .js file: site-javascript/instant/cvi_text_lib.js
- Within your image tag, add class="instant itxtalt"
- Save your file
- Refresh your Firefox page
Test what you know:
- Go to http://www.netzgesta.de/instant/
- Under the Classes section, find the element that allows you to control the color of the caption text
- Modify class="instant itxtalt" so that your caption color is bright red (FF0000)
