Bouncing Element

HTML

<html>
    <head>
    </head>
    <body>
        <div id="scroller">Some controls</div>
    </body>
</html>

CSS

body{
    height:1000px;
    margin:0;
    padding:0;
}

#scroller{
    position:relative;
    top:60px;
    width:100%;
    background:#CCC;
    height:20px;
}

JavaScript

$(window).load(function(){
    $(window).scroll(function(){
        if($(window).scrollTop()>60){
            $('#scroller').css({"top":0,"position":"fixed"});
        }else{
        		 $('#scroller').css({"top":"60px","position":"relative"});
        }
    });
});