When you move the mouse wheel, it hides the fixed div, so you can scroll, and then after a second of no movement, it'll show it again. I don't use the up/down arrows to scroll the page, so I didn't include an "onkeydown" window event, but it wouldn't be that hard to implement.
This is a lousy fix, but it works.
When you move the mouse wheel, it hides the fixed div, so you can scroll, and then after a second of no movement, it'll show it again. I don't use the up/down arrows to scroll the page, so I didn't include an "onkeydown" window event, but it wouldn't be that hard to implement.
<style>
#fixedDivId {
position:fixed;
right:0px;
bottom:0px;
border: 1px solid #000;
background: #FFF;
}
</style>
<div id="fixedDivId">I'm fixed.</div>
<script type="text/ javascript" ><!--
var hideTimer = false; addEventListene r('DOMMouseScro ll', hideFixedDiv, false);
window.
function hideFixedDiv(e){ getElementById( 'fixedDivId' ).style. display = 'none'; setTimeout( "document. getElementById( 'fixedDivId' ).style. display = ''; hideTimer = false;", 1000);
document.
if (hideTimer) {
clearTimeout ( hideTimer );
}
hideTimer = window.
}
//-->
</script>
---- Same thing only in jquery, and using a class.
<style>
,fixed {
position:fixed;
right:0px;
bottom:0px;
border: 1px solid #000;
background: #FFF;
}
</style>
<div class="fixed">I'm fixed.</div>
<script type="text/ javascript" ><!--
var hideTimer = false; addEventListene r('DOMMouseScro ll', hideFixedClasses, false);
window.
function hideFixedClasse s(e){ ).css(' display' ,'none' ); setTimeout( "$('.fixed' ).css(' display' ,''); hideTimer = false;", 1000);
$('.fixed'
if (hideTimer) {
clearTimeout ( hideTimer );
}
hideTimer = window.
}
//-->
</script>