Hi, I have several movable DIVs on my page. Each has a little image of an arrow. My intention is when I roll over the arrow image, another DIV will appear underneath the arrow. I figured I could call ".show()" on the DIV and then adjust it's top and left coorindates based on the image's. However, attempting to set the top and left coordinates of the DIV are failing and I repeatedly get "auto" values when I see what they are ...
// Load behavior for context menu drop down. $ ('.contextMenuTrigger').hover(function() { $(this).attr('src', 'images/ menu_arrow_hover.JPG'); // Make the menu appear beneath the image. var x = $(this).css( 'left' ); var y = $(this).css( 'top' ); $('#contextMenu').css('top', y +16); $('#contextMenu').css('left', x); $('#contextMenu').show(); alert($ ('#contextMenu').css('top') + "\n" + $('#contextMenu').css('left')); }, function() { $(this).attr('src', 'images/ menu_arrow.JPG'); $('#contextMenu').hide(); }); Any ideas how I can improve the above code? Thanks, - Dave