<script type="text/javascript">$(document).ready(function(){ $('.topbar a, .fixedbar a').on('click', function(e) { e.preventDefault(); }); $(window).on('scroll',function() { var scrolltop = $(this).scrollTop(); if(scrolltop >= 125) { $('#fixedbar').fadeIn(250); } else if(scrolltop <= 120) { $('#fixedbar').fadeOut(250); } });});</script>
<nav id="fixedbar"> <div id="fixednav"> some navigation here </div> </nav>