Search the Community
Showing results for tags 'Floating Top Menu Bar'.
-
In this tutorial I will show you how to make the top horizontal menu float (fixed horizontal top menu) for prestashop 1.5.6.x So let's do it! 1- go to "/modules/blocktopmenu/js" and open this file "superfish-modified.js" 2- with an html editor or a notepad open the file and search for this code: })(jQuery); jQuery(function(){ jQuery('ul.sf-menu').superfish(); }); and change it with this code here: })(jQuery); jQuery(function(){ jQuery('ul.sf-menu').superfish(); var sticky = $('.sf-menu').offset().top; $(window).scroll(function(){ if( $(window).scrollTop() > sticky ) { $('.sf-menu').css({position: 'fixed', top: '0px', width: '1028px', margin: '0px 0px 0px' }); } else { $('.sf-menu').css({position: 'static', top: '0px', width: '100%', margin: '10px 0px 0px' }); } }); }); 3 - Depending on your theme, you maybe need to edit the widths and margins of this code, change it according to your theme. The result is a nice floating Horizontal top menu bar that's all. I hope you find it useful!
- 35 replies
-
- 3
-
-
- Tutorial
- Horizontal Top Menu Bar
- (and 2 more)