Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Zoom Function

Status
Not open for further replies.

Nebooaw

Programmer
Jun 1, 2001
142
GB
Hi, i have found this zoom function which zooms into the screen when you double click anywhere in a document and zooms out again on the next double click. Any idea how i could modify it to zoom into where the mouse currently is or to zoom in to a layer on the document?


function ZOOM()
{
if (document.body && document.body.style && typeof document.body.style.zoom != "undefined")
{
if (document.body.style.zoom=="400%")
document.body.style.zoom = "100%";
else
{
document.body.style.zoom = "400%";
//alert('You\'ve doubleclicked on the document.\nDoubleclick again to unzoom.');
}
}
}
document.ondblclick=ZOOM;


Kind Regards.
 
hi,
gr8 piece of code, but i think this might do it:

<div onmouseover="this.style.zoom='200%'" onmouseout="this.style.zoom='100%'">
asdsad
</div>

<br>asdasd


Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top