div
    ~
Advanced Hosters -

DK +
wordpress
: 18.06.2008
: 2425
# : 13, 2014 5:38 pm
<script language="javascript">
$(document).ready(function(){
var floatsidebar = $("#float-sidebar");
var offset = floatsidebar.offset();
var left = offset.left;
var top = offset.top;
var width = $("#float-sidebar").width();
var height = $("#float-sidebar").height();

$(window).scroll(function(){
var scrollTop = $(window).scrollTop();
if (scrollTop >= top) {
$('#float-sidebar').css({
left:left+'px',
position:'fixed',
top:"0px",
width:width+"px"
});
} else {

$('#float-sidebar').css({
position:'static',
});
}
});
});
</script>

<div id="float-sidebar"> </div>

?
    ~