Skip to content

Commit

Permalink
Update footer cookie bar margin on resize
Browse files Browse the repository at this point in the history
  • Loading branch information
tdiam committed Feb 17, 2018
1 parent 0ce4ea4 commit 8b0e4e5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion public/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -37766,7 +37766,10 @@ $(document).ready(function () {

if (readCookie("cookiePrompt") != "on") {
$(".cookie-bar").show();
$("footer").css("margin-bottom", $(".cookie-bar").outerHeight() + "px");
$("footer").addClass("cookieMargin").css("margin-bottom", $(".cookie-bar").outerHeight() + "px");
$(window).on("resize", _.debounce(function () {
$("footer.cookieMargin").css("margin-bottom", $(".cookie-bar").outerHeight() + "px");
}));
}
$("#accept-cookies").on("click", function (e) {
e.preventDefault();
Expand Down
5 changes: 4 additions & 1 deletion resources/assets/js/eu-cookie.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ $(document).ready(function(){

if(readCookie("cookiePrompt") != "on") {
$(".cookie-bar").show()
$("footer").css("margin-bottom", $(".cookie-bar").outerHeight() + "px")
$("footer").addClass("cookieMargin").css("margin-bottom", $(".cookie-bar").outerHeight() + "px")
$(window).on("resize", _.debounce(function() {
$("footer.cookieMargin").css("margin-bottom", $(".cookie-bar").outerHeight() + "px")
}))
}
$("#accept-cookies").on("click", function(e){
e.preventDefault()
Expand Down

0 comments on commit 8b0e4e5

Please sign in to comment.