View Full Version : Change Div Image Based on Position Question
07-15-2009, 09:03 AM
For example if the div with the dog image here (http://tab-bot.com/drag_resize.htm) is moved to a certain point to the right, it would change to cat.jpg.
Thanks so much
07-15-2009, 09:15 AM
This is a tough one, I think. Explorer has a pair of proprietary objects, offsetX and offsetY which give the mouse coordinates for an event, relative to the srcElement. But unless you only care about IE, you'll need something cross-browser and this is an area where there has been a lot of inconsistency.
All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.
07-15-2009, 12:48 PM
07-15-2009, 03:18 PM
Cool, thank you for the links!
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.