Jump to content
xisto Community
Sign in to follow this  
conret

Picture Enlargement javascript code

Recommended Posts

ok i have alot of pictures on my site and i need a way in which i can hold my mouse over the pictures and the picture can get bigger. I know it will be some kind of javascript or flash trick can anyone explain the prosess for it?

Share this post


Link to post
Share on other sites

<script language="javascript">
// © 2002 Premshree Pillai
// http://qiksearch.com/
// premshree@hotmail.com
// Loaction of this script :
// http://forums.xisto.com/no_longer_exists/
// Visit http://forums.xisto.com/no_longer_exists/ for more FREE scripts

document.write('<div id="izo_div" style="position:absolute; top:130; left:190"><img src="izo.gif" border="3" bordercolor="#000000" name="izo" alt="Image Zoom Out" onclick="java script:setTimeout("zoom_out()",1000);" style="cursor:hand"></div>');

img_act_width = izo.width;
img_act_height = izo.height;

i=1;

function zoom_out()
{
if(izo.width==0)
{
izo.border=0;
}
if(izo.width!=0)
{
izo.width-=i;
izo.height=Math.round(izo.width*((img_act_height)/(img_act_width)));
setTimeout("zoom_out()",1);
i+=1;
}
}

</script>

That might be it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.