Hmmm, so how many images are output. I have a feeling if it is one image with a lot of mapping that you're troubles don't begin or end with element positions.
Granted, if you had a lot of images in a document that you need to graphically enhance in this manner, I'd use $$ to collect all necessary images, send them to a function to attach mouseover/out events, and build its absolutely positioned overlay, you'll need its cumulativeOffset and its dimensions, position the overlay div at those coordinates with those dimensions and make sure its z-index is higher than the image, don't forget to lower opacity. Once its built, you can attach it to the document but just make sure its hidden, then on the img's mouseover effect just show the overlay, you can even extend the image object to contain an extra reference, like img.overlay.show(); On Jul 6, 7:42 am, Vlad <[EMAIL PROTECTED]> wrote: > Christophe, cheers. > > I've got a third party server side component that generates graphs. > They are output as images + image map that represents graph columns/ > bars, making them hot spots. > > I want a user to be able to point a mouse over the picture and see all > hot spots (like on Flickr). Nonetheless, since I have no idea there on > page the image will appear and hotspots are relative to the image, I > need to use JS extensively to calculate image position and then draw > divs to indicate hot spots over it. > > Hence the question. I know there are plenty scripts on Internet to > find element's position. I wonder if I could use prototype for that, > however. > > Vlad --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
