How-to...When checkbox is clicked, image overalys another image?

Discussion in 'JavaScript' started by Bulldog-Designs, Jul 13, 2011.

  1. #1
    quick example:
    you have a car on an ecommerce site. you click on: [] add stickers checkbox
    then, an image overlay of the stickers is placed on the car.

    Is this possible? Can someone point me in the right direction - thanks so much!
     
    Bulldog-Designs, Jul 13, 2011 IP
  2. prasanthmj

    prasanthmj Member

    Messages:
    62
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    45
    #2
    prasanthmj, Jul 13, 2011 IP
  3. uwmilo

    uwmilo Peon

    Messages:
    13
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If you do not need animation, you just need to change the offsetLeft and offsetTop.

    If you do need animation, you should use a timer (setInterval) that shifts the sticker by a few pixels until its position (style.left and style.top) reaches the car.
     
    uwmilo, Jul 15, 2011 IP