[FloatingLink]

Ein Textlink verharrt immer am rechten oberen Bildschirmrand und erleichtert somit die Navigation bei langen Seiten.

[Kompatibilität]

[zwischen <HEAD> und </HEAD>]

<script language="JavaScript">

<!-- Begin
function floatButton () {
if (document.all) {
document.all.topButton.style.pixelTop = document.body.scrollTop;
}
else if (document.layers) {
document.topButton.top = window.pageYOffset;
}
else if (document.getElementById) {
document.getElementById('topButton').style.top = window.pageYOffset + 'px';
   }
}
if (document.all)
window.onscroll = floatButton;
else
setInterval ('floatButton()', 100);
function initButton () {
if (document.all) {
document.all.topButton.style.pixelLeft = document.body.clientWidth - document.all.topButton.offsetWidth;
document.all.topButton.style.visibility = 'visible';
}
else if (document.layers) {
document.topButton.left = window.innerWidth - document.topButton.clip.width - 15;
document.topButton.visibility = 'show';
}
else if (document.getElementById) {
document.getElementById('topButton').style.left = (window.innerWidth - 35) + 'px';
document.getElementById('topButton').style.visibility = 'visible';
   }
}
//  End -->
</script>

[in den <BODY> Tag]

onLoad="initButton()"

[zwischen <BODY> und </BODY>]

<SPAN ID="topButton" STYLE="position: absolute; visibility: hidden; top: 0px;">
<A HREF="javascript: window.scrollTo(0, 0); void 0" ONMOUSEOVER="window.status = 'top'; return true;" ONMOUSEOUT="window.status = ''; return true;">nach oben</A>
</SPAN>

[Autor]

Richard Cleaver

[Download]

kopieren Sie bitte den Code

Copyright © 1998- Nightfire Webworker Archiv Script No: 0137