Hello there,
I put this code in the homapage code injection and when I go to edit the page the edit bar is out of the section and I can't get to it. When I remove the code the problem is gone. Is there any solution?
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://d1j8mu9lowy9zf.cloudfront.net/twcsl/0.2.2/twcsl.js"></script>
<script>
document.addEventListener("DOMContentLoaded",function() {
const header = document.getElementById('header');
const firstSection = document.querySelector('.page-section:first-child');
firstSection.after(header);
});
</script>
<style>
@media screen and (min-width: 768px) {
#header {
position: sticky;
top: 0;
display: none;
}
main .page-section:first-child + #header {
display: block;
}
main .page-section:first-child {
min-height: calc(100vh - 93px)!important;
}
}
</style>