jquery - When scrolling, navigation falls behind content -


on site whenever scroll down , navigation stretched out falls behind content.

here script:

.menu { position: relative; z-index:9999; }  .post { background: #fff; border: 1px solid #ddd; font-size: 16px; }    <script>     var num = $('.header').height();       $(window).bind('scroll', function () {      if ($(window).scrolltop() > num) {      $('.menu').addclass('fixed-nav');      $('.wrapper').before($('.menu'));      }      else {      $('.menu').removeclass('fixed-nav');      $('.menu-menu-container').prepend($('.menu'));      }      });     </script> 

i have tried adding z-index high can, still no luck.

i added z-index: 999; #header css rule , worked atleast on chrome.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -