DIV position fixed at top on scroll
You are looking for Div sticky while you scroll the page . Use this below script .
<script> $(window).scroll(function(){ if ($(this).scrollTop() > 150) { $('#div_id').addClass('fixed_class'); /* change #div_id to your div id*/ } else { $('#div_id').removeClass('fixed_class'); /* change #div_id to your div id*/ } }); </script> <style> .fixed_class { position:fixed; top:0; left:0;} </style>