Merge pull request #792 from prateek-webkul/development

Development
This commit is contained in:
Jitendra Singh 2019-04-03 16:15:16 +05:30 committed by GitHub
commit 86198676a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@ -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"
}

View File

@ -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();
}
});
}
}
});