Skip to content

Commit

Permalink
Fix position of fixed banner with filters (update color-finder.css & …
Browse files Browse the repository at this point in the history
…affix.js)
  • Loading branch information
amezigh committed Mar 7, 2017
1 parent 0e0b64d commit 3a0c5ef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ fieldset .form-control {
}

#contrast-solution thead.affix {
top: 136px;
width: 100%;
margin-left: -4px;
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions contrast-finder-webapp/src/main/webapp/Js/affix.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,25 @@ $(function() {
setUpForm = $('#set-up-form').height(),
limit = header + setUpForm + 68;
return (this.top = header + setUpForm + 68)
}
}
}
});

$(window).on('resize scroll', function() {
var header = $('#header').height(),
bannerHeight = $('#old-contrast').height(),
setUpForm = $('#set-up-form').height(),
limit = header + setUpForm + 68;

if (
$(this).scrollTop() > limit &&
$(this).width() >= 768
) {
$('body').css('margin-top', '160px');
$('body').css('margin-top', '160px');
$('#contrast-solution thead').css('top', bannerHeight);
} else {
$('body').css('margin-top', 'inherit');
$('#contrast-solution thead').css('top', 0);
}
});
});

0 comments on commit 3a0c5ef

Please sign in to comment.