Image Pop-ups
JavaScript can be used to add pop-up interactivity to your images. A pop-up typically consists of a small image (thumbnail), which when clicked, pops open a larger version of the image in a separate window. Pop-ups are often used when 'real estate' (space) issues exist on a webpage.
Lightbox
One of, if not the original, 'box' JavaScript pop-up tools. Like the previous image effects, pop-up functionality is to be supplied by an external .js file. Users can control the ‘look and feel’ of the pop-up window by editing a set of CSS rules. This pop-up effect, including instructions for use and file downloads can be found at:
![]() |
![]() |
In Adobe Bridge:
- Locate and select both pop-up-1.jpg and pop-up-2.jpg in the ‘site-working‘ folder
- Right-click and choose open with Photoshop
In Adobe Photoshop:
- Highlight pop-up-1.jpg
- From the Menu Bar, go to Image > Image Size
- Set the image width value to 600 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 image as pop-up-1-big.jpg into the ‘site-media’ folder
- From the Menu Bar, go to Image > Image Size
- Set the image width value to 200 pixels
- Set the interpolation to Bicubic
- 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 image as pop-up-1-small.jpg into the ‘site-media’ folder
- Close the pop-up-1.jpg file – do NOT save
- Repeat the multi resize/save process above for pop-up-2.jpg
- Close the pop-up-2.jpg file – do NOT save
In Adobe Dreamweaver:
- Open pop-up.html
- Working in Design View
- Replace the page left, left image with pop-up-1-small.jpg from the ‘site-media’ folder
- Replace the page left, right image with pop-up-2-small.jpg from the ‘site-media’ folder
- Be sure both images are not scaled in the Properties Panel
- Link pop-up-1-small.jpg to pop-up-1-big.jpg in the Properties Panel
- Link pop-up-2-small.jpg to pop-up-2-big.jpg in the Properties Panel
- Save your file
- From the Menu Bar, File > Preview in Browser > Firefox
- Test your image links
To add the lightbox pop-up functionality and CSS:
- 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/lightbox/lightbox.js
- In the CSS Panel, click the Attach Style Sheet icon (chain links)
- Attach: site-javascript/lightbox/lightbox.css
To add the lightbox pop-up effect:
- Working in Design View
- Select the pop-up-1-small.jpg image
- Switch to Code View
- Within the pop-up-1-small.jpg link tag <a>, add rel="lightbox"
- Within the pop-up-2-small.jpg link tag <a>, add rel="lightbox"
- To add a pop-up window caption, within the pop-up-2-small.jpg link tag <a>, title="change me"
- Save your file
- Refresh your Firefox page
- Click on you pop-ups
To modify the default CSS look:
- In the CSS panel, double-click to modify the #lightbox rule
- In the Background section, change the Background-color value to one of your own liking
- Save your files
- Refresh your Firefox page
- Click on your pop-ups
Modify the lightbox.js file:
- In the Files panel, double-click to open: site-javascript/lightbox/lightbox.js
- In line 38, change to ‘site-javascript/lightbox/loading.gif’
- In line 39, change to ‘site-javascript/lightbox/close.gif’
- Save your files
- Refresh your Firefox page
- Click on your pop-ups
Shadowbox
Based off the original Lightbox tool, pop-up functionality is also supplied by an external .jf file. Users can control the ‘look and feel’ of the pop-up window by editing a set of CSS rules. The pop-up tool can easily be modified to create a pop-up gallery. This pop-up effect, including instructions for use and file downloads can be found at:
![]() |
![]() |
Remove the conflict between Lightbox and Shadowbox
- Working in Code View
- In the <head> section, remove the links to the lightbox.js and lightbox.css files
- Remove the rel="lightbox" from each lightbox’d image link
- Save your files and refresh your Firefox page
- Save your files
- Refresh your Firefox page
- Click on your pop-ups
In Adobe Bridge:
- Locate and select both pop-up-3.jpg and pop-up-4.jpg in the ’site-working’ folder
- Right-click and choose open with Photoshop
In Adobe Photoshop:
- Highlight pop-up-3.jpg
- From the Menu Bar, go to Image > Image Size
- Set the image width value to 600 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 image as pop-up-3-big.jpg into the ‘site-media’ folder
- From the Menu Bar, go to Image > Image Size
- Set the image width value to 200 pixels
- Set the interpolation to Bicubic
- 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 image as pop-up-3-small.jpg into the ‘site-media’ folder
- Close the pop-up-3.jpg file – do NOT save
- Repeat the multi resize/save process above for pop-up-4.jpg
- Close the pop-up-4.jpg file – do NOT save
In Adobe Dreamweaver:
- Working in Design View
- Replace the page right, left image with pop-up-3-small.jpg from the ‘site-media’ folder
- Replace the page right, right image with pop-up-4-small.jpg from the ‘site-media’ folder
- Be sure both images are not scaled in the Properties Panel
- Link pop-up-3-small.jpg to pop-up-3-big.jpg in the Properties Panel
- Link pop-up-4-small.jpg to pop-up-4-big.jpg in the Properties Panel
To add the shadowbox pop-up functionality and CSS:
- 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/shadowbox/shadowbox.js
- Add the following to the <head> section:
<script type="text/javascript"> Shadowbox.init(); </script> - In the CSS Panel, click the Attach Style Sheet icon (chain links)
- Attach: site-javascript/shadowbox/shadowbox.css
To add the shadowbox pop-up effect:
- Working in Design View
- Select the pop-up-3-small.jpg image
- Switch to Code View
- Within the pop-up-3-small.jpg link tag, add rel="shadowbox"
- Within the pop-up-4-small.jpg link tag, add rel="shadowbox”
- To add a pop-up window caption, within the pop-up-4-small.jpg link tag <a>, title="change me"
- Save your files
- Refresh your Firefox page
- Click on your shadowbox pop-ups
To Create a shadowbox pop-up gallery:
- Working in Code View
- Within the pop-up-3-small.jpg link tag, change to rel="shadowbox[group]"
- Within the pop-up-4-small.jpg link tag, change to rel="shadowbox[group]"
- Save your files
- Refresh your Firefox page
- Click on your shadowbox pop-ups
Pop-up from text link: test what you know!
- Link this text to pop-up-4-big.jpg
- Add rel="shadowbox" to the text link tag
- Save your files
- Refresh your Firefox page
- Click on the text link above



