1 2 Previous Next 43 Replies Latest reply on Mar 6, 2013 9:56 PM by sudarshan.t

    how to position spry tool tip relative to a div instead of top left of page


      I have modified the java script to make a spry tool tip position from the top left of my page.  I need it to be placed from a position defined from the top left of a div instead so it always displays in the same spot regardless of the screen or browser size.  Any ideas?  this is what I changed to get the default positioning from the cursor position:


      In  SpryTooltip.js  change Line 211:


      Spry.Widget.Utils.putElementAt(this.tooltipElement, this.pos, {x:this.offsetX, y:this.offsetY}, true);


      Spry.Widget.Utils.putElementAt(this.tooltipElement, {x:this.offsetX, y:this.offsetY}, true);

      This ignores the mouse position and just uses the offsets to set the fixed postion...


      here is a link to what I am working on.  The top center forklift is the item I have built so far that has the tooltip on hover.




      Thanks!  Mike

        1 2 Previous Next