PhantomSnake (talk | contribs) mNo edit summary |
PhantomSnake (talk | contribs) mNo edit summary |
||
Line 12: | Line 12: | ||
var float = document.getElementById('float</plainhtml>{{{1}}}<plainhtml>'); | var float = document.getElementById('float</plainhtml>{{{1}}}<plainhtml>'); | ||
var floatanchor = document.getElementById('floatanchor</plainhtml>{{{1}}}<plainhtml>'); | |||
var link = document.getElementById('floatlink</plainhtml>{{{1}}}<plainhtml>'); | var link = document.getElementById('floatlink</plainhtml>{{{1}}}<plainhtml>'); | ||
var linkend = document.getElementById('floatlinkend</plainhtml>{{{1}}}<plainhtml>'); | var linkend = document.getElementById('floatlinkend</plainhtml>{{{1}}}<plainhtml>'); | ||
Line 17: | Line 18: | ||
float.style.display = 'block'; | float.style.display = 'block'; | ||
var posX = findRelPosX(link) + ((findRelPosX(linkend) - findRelPosX(link)) / 2) - 175; | var posX = findDistanceX(floatanchor, link) + findRelPosX(link) + ((findRelPosX(linkend) - findRelPosX(link)) / 2) - 175; | ||
if(posX < 0) { | if(posX < 0) { | ||
posX = 12; | posX = 12; | ||
} | } | ||
var posY = findRelPosY(link) + 19; | var posY = findDistanceY(floatanchor, link) + findRelPosY(link) + 19; | ||
float.style.left = posX + 'px'; | float.style.left = posX + 'px'; | ||
Line 50: | Line 51: | ||
</script> | </script> | ||
<div> | <div id="floatanchor</plainhtml>{{{1}}}<plainhtml>>"> | ||
<div id="float</plainhtml>{{{1}}}<plainhtml>" onMouseOver="showFloat</plainhtml>{{{1}}}<plainhtml>()" onMouseOut="delayedHideFloat</plainhtml>{{{1}}}<plainhtml>()" style="background: white; display: none; position: absolute; border: 1px solid #A9AFFF; color: #000; background-color: #DDDEFF; padding: 2px; width: 350px; height: 150px; overflow: auto; z-index: 100;"></plainhtml><table width="333" border="0" cellpadding="0" cellspacing="0"><tr><td bgcolor="#F0F0FF"><b>{{{2}}}</b></td><td align="right" bgcolor="#F0F0FF">[[{{{2}}} | article]] | [[Talk:{{{2}}} | discussion]]</td></tr></table> <hr> {{:{{{2}}}}}<plainhtml></div> | <div id="float</plainhtml>{{{1}}}<plainhtml>" onMouseOver="showFloat</plainhtml>{{{1}}}<plainhtml>()" onMouseOut="delayedHideFloat</plainhtml>{{{1}}}<plainhtml>()" style="background: white; display: none; position: absolute; border: 1px solid #A9AFFF; color: #000; background-color: #DDDEFF; padding: 2px; width: 350px; height: 150px; overflow: auto; z-index: 100;"></plainhtml><table width="333" border="0" cellpadding="0" cellspacing="0"><tr><td bgcolor="#F0F0FF"><b>{{{2}}}</b></td><td align="right" bgcolor="#F0F0FF">[[{{{2}}} | article]] | [[Talk:{{{2}}} | discussion]]</td></tr></table> <hr> {{:{{{2}}}}}<plainhtml></div> | ||
</div> | </div> | ||
</plainhtml> | </plainhtml> |
Revision as of 18:41, 28 June 2006
<plainhtml>
<script type="text/javascript">
var visible</plainhtml>{{{1}}}<plainhtml> = false;
if(typeof useFloats == 'undefined') { alert('Template:UseFloats must be included for "floating frames" support.'); }
function showFloat</plainhtml>{{{1}}}<plainhtml>() { if(typeof useFloats == 'undefined') { return; } var float = document.getElementById('float</plainhtml>{{{1}}}<plainhtml>'); var floatanchor = document.getElementById('floatanchor</plainhtml>{{{1}}}<plainhtml>'); var link = document.getElementById('floatlink</plainhtml>{{{1}}}<plainhtml>'); var linkend = document.getElementById('floatlinkend</plainhtml>{{{1}}}<plainhtml>'); float.style.display = 'block';
var posX = findDistanceX(floatanchor, link) + findRelPosX(link) + ((findRelPosX(linkend) - findRelPosX(link)) / 2) - 175; if(posX < 0) { posX = 12; }
var posY = findDistanceY(floatanchor, link) + findRelPosY(link) + 19;
float.style.left = posX + 'px'; float.style.top = posY + 'px';
visible</plainhtml>{{{1}}}<plainhtml> = true; } function delayedHideFloat</plainhtml>{{{1}}}<plainhtml>() { if(typeof useFloats == 'undefined') { return; }
visible</plainhtml>{{{1}}}<plainhtml> = false; window.setTimeout("hideFloat</plainhtml>{{{1}}}<plainhtml>()", 200); } function hideFloat</plainhtml>{{{1}}}<plainhtml>() { if(typeof useFloats == 'undefined') { return; } if(visible</plainhtml>{{{1}}}<plainhtml>) { return; } var float = document.getElementById('float</plainhtml>{{{1}}}<plainhtml>'); float.style.display = 'none'; return; }
</script>
<div id="floatanchor</plainhtml>{{{1}}}<plainhtml>>">
<div id="float</plainhtml>{{{1}}}<plainhtml>" onMouseOver="showFloat</plainhtml>{{{1}}}<plainhtml>()" onMouseOut="delayedHideFloat</plainhtml>{{{1}}}<plainhtml>()" style="background: white; display: none; position: absolute; border: 1px solid #A9AFFF; color: #000; background-color: #DDDEFF; padding: 2px; width: 350px; height: 150px; overflow: auto; z-index: 100;"></plainhtml>
{{{2}}} | [[{{{2}}} | article]] | [[Talk:{{{2}}} | discussion]] |
{{:{{{2}}}}}<plainhtml>
</plainhtml>