Template:Float: Difference between revisions

Template page
mNo edit summary
mNo edit summary
Line 16: Line 16:
      
      
     float.style.display = 'block';
     float.style.display = 'block';
     float.style.left = (findPosX(link) + ((findPosX(linkend) - findPosX(link)) / 2) - 150) + 'px';
     float.style.left = (findPosX(link) + ((findPosX(linkend) - findPosX(link)) / 2) - 175) + 'px';
      
      
     visible</plainhtml>{{{1}}}<plainhtml> = true;           
     visible</plainhtml>{{{1}}}<plainhtml> = true;           
Line 50: Line 50:


<div>
<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 #000000; width: 300px; height: 200px; overflow: auto;">
<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 #000000; width: 350px; height: 150px; overflow: auto;">
asjhjh jsf jasgd fkajhgs<br> fuiaew fagwh fejgs dfjgas<br> djkfga sdkjfg akjeg<br> wieuy wraeeef akjef jasd<br>  
asjhjh jsf jasgd fkajhgs<br> fuiaew fagwh fejgs dfjgas<br> djkfga sdkjfg akjeg<br> wieuy wraeeef akjef jasd<br>  
asjhjh jsf jasgd fkajhgs<br> fuiaew fagwh fejgs dfjgas<br> djkfga sdkjfg akjeg<br> wieuy wraeeef akjef jasd<br>  
asjhjh jsf jasgd fkajhgs<br> fuiaew fagwh fejgs dfjgas<br> djkfga sdkjfg akjeg<br> wieuy wraeeef akjef jasd<br>  

Revision as of 16:01, 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 link = document.getElementById('floatlink</plainhtml>{{{1}}}<plainhtml>');
   var linkend = document.getElementById('floatlinkend</plainhtml>{{{1}}}<plainhtml>');
   
   float.style.display = 'block';
   float.style.left = (findPosX(link) + ((findPosX(linkend) - findPosX(link)) / 2) - 175) + '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>

<a

 href="/wiki/</plainhtml>{{{2}}}<plainhtml>"
 title="</plainhtml>{{{2}}}<plainhtml>"
 id="floatlink</plainhtml>{{{1}}}<plainhtml>"
 onMouseOver="showFloat</plainhtml>{{{1}}}<plainhtml>()"
 onMouseOut="delayedHideFloat</plainhtml>{{{1}}}<plainhtml>()"

></plainhtml>{{{2}}}<plainhtml></a><a id="floatlinkend</plainhtml>{{{1}}}<plainhtml>"> </a>

<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 #000000; width: 350px; height: 150px; overflow: auto;"> asjhjh jsf jasgd fkajhgs
fuiaew fagwh fejgs dfjgas
djkfga sdkjfg akjeg
wieuy wraeeef akjef jasd
asjhjh jsf jasgd fkajhgs
fuiaew fagwh fejgs dfjgas
djkfga sdkjfg akjeg
wieuy wraeeef akjef jasd
asjhjh jsf jasgd fkajhgs
fuiaew fagwh fejgs dfjgas
djkfga sdkjfg akjeg
wieuy wraeeef akjef jasd

</plainhtml>