Make cookie notice animation code more efficient
Try to set position back to original value when cookie notice is hidden
This commit is contained in:
@@ -61,7 +61,7 @@ body {
|
|||||||
background: --mdc-theme-primary;
|
background: --mdc-theme-primary;
|
||||||
color: --mdc-theme-background;
|
color: --mdc-theme-background;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
bottom: 0;
|
bottom: -100;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,9 +40,11 @@ $(document).ready(function(){
|
|||||||
$(".source-code-link").animate({bottom: "+100px"}, 1000);
|
$(".source-code-link").animate({bottom: "+100px"}, 1000);
|
||||||
$("#close-cookies").click(function(){
|
$("#close-cookies").click(function(){
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
$("#cookies").animate({bottom: "0px"}, 1000);
|
// $("#cookies").animate({bottom: "0px"}, 1000);
|
||||||
|
$("#cookies").removeAttr("style");
|
||||||
$("#cookies").hide();
|
$("#cookies").hide();
|
||||||
$(".source-code-link").animate({bottom: "0px"}, 1000);
|
$(".source-code-link").removeAttr("style");
|
||||||
|
// $(".source-code-link").animate({bottom: "0px"}, 1000);
|
||||||
Cookies.set("demo.matthew-grove.ml-cookies-accepted", "true", {expires: 30});
|
Cookies.set("demo.matthew-grove.ml-cookies-accepted", "true", {expires: 30});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user