1) Script Title: ddimgtooltip
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...agetooltip.htm
3) Describe problem: Unable to get rollover pop-up image to appear in the same place on the page, regardless of where the text is located on that page.
I have this so far, and its works to get the image always in the same place relating to the x-axis.. when I try to setup the y-axis the image drops to the bottom of the page and it makes no difference which value I enter.
This is what I have so far, this is correct for x-axis, but y-axis still follows the mouse.
What do I need to change this to, in order to lock its position in the y-axis?Code:positiontooltip:function($, $tooltip, e){ var x=e.pageX+this.tooltipoffsets[0], y=e.pageY+this.tooltipoffsets[1] var tipw=$tooltip.outerWidth(), tiph=$tooltip.outerHeight(), x=(x+tipw>$(document).scrollLeft()+$(window).width())? x-tipw-(ddimgtooltip.tooltipoffsets[0]*2) : $(document).scrollLeft()+$(window).width()-tipw-10 y=(y+tiph>$(document).scrollTop()+$(window).height())? $(document).scrollTop()+$(window).height()-tiph-10 : y $tooltip.css({left:x, top:y})
Thanks in advanceCode:y=(y+tiph>$(document).scrollTop()+$(window).height())? $(document).scrollTop()+$(window).height()-tiph-10 : y
Lee



Reply With Quote


Bookmarks