You will want to use the offset method to find the top and left values
of the image and then position the div absolute with those values. The
offset is calculated from the top, left of the document ... so your
div will need to be positioned relative to the body tag. Now for the
code.

var offset = $('#customer_code img.ico').offset();
$('#myDiv').css(offset);

The offset method returns an object with top and left properties. You
can pass that object directly into css to set the values.

Let me know if I can help clear anything else up!

--
Brandon Aaron

On 5/9/07, Paul Malan <[EMAIL PROTECTED]> wrote:

I'm sure the dimensions plugin is far less complicated than I think it
is, but I'm sick of fighting with it to figure this out.  The visual
demo in the svn repository is way over my head.

I have several status icon images that may be hidden or visible
depending on system state.  I need to display a status balloon (much
like what you see in Windows XP when you plug in a USB device) next to
these icons.

Essentially, if I have an image $("#customer_code img.ico"), how can I
use the dimensions plugin to position another div relative to this
image?

Thanks for any help...


Reply via email to