javascript
Brief description  about Online courses   join in Online courses
View papaiah  ikkurthi 's Profile

image hover

Dear sir,
can you please send code for image hover i.e i have given some small images in html page just i want that images big when we click on it(mouse click).....please help me...
Asked by papaiah ikkurthi | Mar 29, 2011 |  Reply now
Replies (2)
View papaiah ikkurthi 's Profile
thanku
May 7, 2011
View santosh hegde 's Profile
Hi,
Get this code:
<html>
<head>
<title>Zoom-in, Zoom-out Image with javascript</title>
<script language="javascript">

function zoomin()
{
document.getElementById('i1').height = 574;
document.getElementById('i1').width = 410;
}

function zoomout()
{
document.getElementById('i1').height = 50;
document.getElementById('i1').width = 40;
}
</script>
</head>
<body>
<img src="yourImage.jpg" id="i1" height=50 width=40 onmouseover="zoomin();" onmouseout="zoomout()" />
<br />
<br />
<br />
<p>Or Try this</p>
<img src="yourImage.jpg" id="i1" height=50 width=40 onclick="zoomin();" onmouseout="zoomout()" />
</body>
</html>

Just try this simple code, it may helpful for you...!! :)
Mar 30, 2011