javascript - Tooltip using Prototype.js -


The tooltip for the prototype library seems easy to use. People who are outside are so bloated.

What I see is simple in this way.

  & lt; A class = "tooltip" & gt; This is my sentence & lt; Span & gt; Tooltip is here & lt; / Span & gt; Which ends in sadness. & Lt; / A & gt; & Lt; A class = "tooltip" & gt; How can I do this & lt; Span & gt; Like how? & Lt; / Span & gt; Without killing people & Lt; / A & gt;  

I have a CSS solution but the problem is one time, tooltip is close to the browser, it gets farthest from the corner. I like to be smart and by the side of the browser window Do not go

Anyway? I was thinking about using the prototype to find and move the X-W coordinates of the pop-up. But how to do it?

This is what I am using for CSS

  .date_info a: hover {background: #ffffff; Text-decoration: None;} / * For IG6 * BG color is required. / Dat_info a.tooltip span {display: none; Padding: 2px 3px; Margin-left: 8px; Width: 200px;} .date_info a.tooltip: hover span {display: inline; Status: Completed; Background: #ffffff; Border: 1 px solid # 555; Color: # 6c6c6c;}   

is a good tooltip project for prototypes, which you call this out Investigation of? Even if you do not end it, can it be helpful to get some ideas around the code to get some ideas, or is it one of the bloated substances mentioned?

If it helps, then I put together a snippet of this prototype JS that determines whether an entry is within the viewport or not, if you are not happy with the second solution, then you Can start. function inport (l) {var elOffset = $ (el). Assessed offset (L); VpOffset = document.viewport.getScrollOffsets (); LDM = $ (L) .getDimensions (); VpDim = document.viewport.getDimensions (); If (aloffets [1] + aldim. Hi vpOffset [1] + vpDim.height || L-offset [0] + aldim.with | lt | vpOffset | [0] | | Al-Offset [0]> vpOffset [0] + vpDim.width) {return false; } Back true; }

You can use it like this:

  if (! Inbound view ($ (L)) {// move me - Add padding / margin or something like that}  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -