View Full Version : another way
Benny Pedersen
January 16th, 2008, 04:31 AM
For some years ago I figured out another way to show before and after images, but I first used this technic today.
Like this:
http://www.fineraw.com/stuff/tuts/bfilter.html
?
Benny
Nimblewill
January 18th, 2008, 07:40 PM
Benny, can you do "roll over" where you can see the before and after changes when you move the cursor over the picture? Either way it's interesting to see what difference the changes make!
Benny Pedersen
January 19th, 2008, 05:54 AM
Benny, can you do "roll over" where you can see the before and after changes when you move the cursor over the picture? Either way it's interesting to see what difference the changes make!
Open Notepad, and save as HTML, this 12 lines:
<!-- saved from url=(0014)about:internet -->
<html><head><title>:)</title>
<script language="JavaScript">var Img= new Array();
Img[00]= 'a_pse5w800x781q30.jpg';
Img[01]= 'b_pse5w800x781q30.jpg';
var U= 1; var i= 1; function Next(){if(i>=U)i=-1;
document.getElementById('Photo').src=Img[++i];}</script></head>
<body onLoad="Next()"><div align="center"><img id="Photo" src=""
onMouseOver="Next()" onMouseOut="Next()"></div></body></html>
The 3 lines with prefix space is the interesting lines.
e.g.
Img[00]= 'BEFORE.JPG';
Img[01]= 'AFTER.JPG';
onMouseOver="Next()" onMouseOut="Next()"
You can remove the onMouseOut="Next()", or you can write
onClick="Next()", or whatever...
Benny
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.