zoom functionality?

Discussion in 'Graphics & Multimedia' started by ktsirig, Oct 25, 2006.

  1. #1
    Hello,
    I have some pictures on my page that I want to add zooming functionality, that is, when a visitor clicks on an image, he will be able to zoom in and out on it.
    Any ideas on how this can be done?
     
    ktsirig, Oct 25, 2006 IP
  2. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #2
    T0PS3O, Oct 25, 2006 IP
  3. ktsirig

    ktsirig Peon

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    well, I have something coded in Javacript that seems to work. But it changes the dimensions of the picture, while I want it to zoom in depth and not change the initial dimensions.

    I have written:
    <html>
    <body>
    <img src="picture" width="86" height="37" onclick="this.width = this.width*2; this.height = this.height*2" id="image" />
    <br />
    <a href="java script:void(0);" onclick="document.getElementById('image').width = document.getElementById('image').width/2; document.getElementById('image').height = document.getElementById('image').height/2;">Zoom out</a>
    <br />Click on image to zoom in
    </body>
    </html>
    \
     
    ktsirig, Oct 25, 2006 IP