Hello, people! In the Interface View I want to fix the Global Tab menu in the top of browser.
It is thus needed that logo area was first scrolled upwards
together with Global Tab menu, and then Global Tab menu gained a
foothold on the top of browser.
Here is images
How can this be done using CSS? I tried adding a custom CSS, but the Global Tab menu does not scroll up:
I'm no CSS or Javascript expert either, but I took another route thinking that we need the menu to stick to the top only when scrolling has lifted it to the top - or beyond the height of the logo. So I've modified your code (thanks) to this:
$(function() {
var logo_height = $('#knack-logo').height();
var fixblock_pos = $('#kn-app-menu').position().top + logo_height; ;
$(window).scroll(function(){
if ($(window).scrollTop() > fixblock_pos){
$('#kn-app-menu').css({'position':'fixed', 'top':'0px', 'z-index':'9999'});
}else{$('#kn-app-menu').css({'position': 'static', 'width': '100%'});
}})});</pre><p>Works beautifully for me, and doesn't need transitions at all. I've posted this as a tip in the API section and thanked you again!</p><p>Brad </p>
I found the Web script that does the job and added the script to the custom zone Javascript it looks like my wish was, but not until the end of the work. I also want to make Global Tab menu smoothly moved into the TOP position when scrolling.