Call Now
+1-908-873-6465
+44-20351-45403
Support

Fixed Menu with Scrolling Page

Want to keep menu always appear on the top, even if you scroll down the page ?

Just follow simple two steps process.


Step 1 :

Write below code template file :

=========================
var _rys = jQuery.noConflict();
_rys("document").ready(function(){
_rys(window).scroll(function () {
if (_rys(this).scrollTop() > 136) {
_rys('#menubar').addClass("f-menublock");
} else {
_rys('#menubar').removeClass("f-menublock");
}
});
});
==========================


(#menubar) the div which will be fixed to top as it will add below class in that div. Write down your template div name here.

 
Step 2 :

Add this css in custom.css file :

==========================
.f-menublock {
    margin: auto;
    z-index: 9999;
    position: fixed;
    top: 0;
    width: 965px;
}
===========================

Done !

Last modified on Tuesday, 28 June 2016 19:24
More in this category: « Form validation using Parsley