How you Create A Sticky Menu In Magento

 

How you Create A Sticky Menu In Magento

Hello magento friend  today's i'm share How you Create A Sticky Menu In Magento

 Create A Sticky Menu In Magento




<style type="text/css">
.sticky {
    position: fixed;
    width: 100%;
    left: 0;
    top: 0;
    z-index: 100;
    border-top: 0;
}
</style>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script type="text/javascript">
                       jQuery(document).ready(function() {
                       var stickyNavTop = jQuery('.nav-container').offset().top;
               var stickyNav = function(){
                var scrollTop = jQuery(window).scrollTop();
                if (scrollTop > stickyNavTop) {
                    jQuery('.nav-container').addClass('sticky');
                } else {
                    jQuery('.nav-container').removeClass('sticky');
                }
            };

            stickyNav();
            jQuery(window).scroll(function() {
                stickyNav();
            });
        });
             
</script>


Deepak Kumar Bind

Success is peace of mind, which is a direct result of self-satisfaction in knowing you made the effort to become the best of which you are capable.

Post a Comment

If you liked this post please do not forget to leave a comment. Thanks

Previous Post Next Post