commit
86198676a1
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/admin.js": "/js/admin.js?id=f242782bc689d99050dd",
|
||||
"/js/admin.js": "/js/admin.js?id=2abf9e6a7eff4fd6fcf2",
|
||||
"/css/admin.css": "/css/admin.css?id=a71a72c31d6ac0fe375f"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,15 +15,21 @@ window.onload = function () {
|
|||
windowHeight = $(window).height();
|
||||
menubarHeight = $('ul.menubar').height();
|
||||
documentHeight = $(document).height();
|
||||
differenceInHeight = menubarHeight - windowHeight;
|
||||
|
||||
if (menubarHeight < windowHeight) {
|
||||
differenceInHeight = windowHeight - menubarHeight;
|
||||
} else {
|
||||
differenceInHeight = menubarHeight - windowHeight;
|
||||
}
|
||||
|
||||
scrollTopWhenWindowLoaded = $(document).scrollTop();
|
||||
|
||||
$('.navbar-left').css('top', -scrollTopWhenWindowLoaded + 60 + 'px');
|
||||
|
||||
$(document).ready(function() {
|
||||
if (menubarHeight > documentHeight && menubarHeight > windowHeight) {
|
||||
$('.inner-section').css("position","fixed");
|
||||
$('.navbar-left').css("position","absolute");
|
||||
$('.inner-section').css("position", "fixed");
|
||||
$('.navbar-left').css("position", "absolute");
|
||||
} else {
|
||||
if (scrollTopWhenWindowLoaded > differenceInHeight) {
|
||||
$('.navbar-left').css('top', -differenceInHeight + 'px');
|
||||
|
|
@ -37,6 +43,14 @@ window.onload = function () {
|
|||
scrollTopValueWhenNavBarFixed = $(document).scrollTop();
|
||||
}
|
||||
});
|
||||
} else if(menubarHeight < windowHeight) {
|
||||
$(document).scroll(function() {
|
||||
documentScrollWhenScrolled = $(document).scrollTop();
|
||||
if (documentScrollWhenScrolled <= differenceInHeight + 70) {
|
||||
$('.navbar-left').css('top', -documentScrollWhenScrolled + 60 + 'px');
|
||||
scrollTopValueWhenNavBarFixed = $(document).scrollTop();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue