mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-05-20 18:34:53 +00:00
Preparing to add AJAX
This commit is contained in:
parent
4c064eeaed
commit
a52f2c3da7
13 changed files with 77 additions and 55 deletions
|
@ -1,17 +1,19 @@
|
|||
console.log(" . . /|/| . . . . . . . \n .. /0 0 \\ . . . . . .. \n (III% . \\________, . . \n .. .\\_, .%###%/ \\'\\,.. \n . . . .||#####| |'\\ \\. \n .. . . ||. . .|/. .\\V. \n . . . .|| . . || . . . \n .. . . ||. . .||. . .. \n . . . .|| . . || . . . \n .. . . ||. . .||. . .. \n . . . .|| . . || . . . \n .. . . ||. . .||. . .. \n . . . .|| . . || . . . \n .. . . ||. . .||. . .. \n . . . .|| . . || . . . \n .. . . ||. . .||. . .. \n . . . .|| . . || . . . \n .. . . ||. . .||. . .. \n . . . .|| . . || . . . \n .. . . ||. . .||. . .. \n . . . .|| . . || . . . \n .. . . ||. . .||. . .. \n . . . cc/ . .cc/ . . .");
|
||||
|
||||
let show = document.querySelectorAll(".flyout-display");
|
||||
let hide = document.querySelector(".flyout-close");
|
||||
$(document).ready(function() {
|
||||
let show = document.querySelectorAll(".flyout-display");
|
||||
let hide = document.querySelector(".flyout-close");
|
||||
|
||||
show.forEach(function(){
|
||||
document.querySelector(".flyout").style.transform= "translateX(-50%) scale(1)";
|
||||
document.querySelector(".flyout").style.bottom= "-1rem";
|
||||
document.querySelector(".flyout-dim").style.display= "block";
|
||||
});
|
||||
|
||||
|
||||
hide.addEventListener("click", function(){
|
||||
document.querySelector(".flyout").style.transform= "translateX(-50%) scale(0.8)";
|
||||
document.querySelector(".flyout").style.bottom= "-20rem";
|
||||
document.querySelector(".flyout-dim").style.display= "none";
|
||||
show.forEach(function(){
|
||||
document.querySelector(".flyout").style.transform= "translateX(-50%) scale(1)";
|
||||
document.querySelector(".flyout").style.bottom= "-1rem";
|
||||
document.querySelector(".flyout-dim").style.display= "block";
|
||||
});
|
||||
|
||||
|
||||
hide.addEventListener("click", function(){
|
||||
document.querySelector(".flyout").style.transform= "translateX(-50%) scale(0.8)";
|
||||
document.querySelector(".flyout").style.bottom= "-20rem";
|
||||
document.querySelector(".flyout-dim").style.display= "none";
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
button = document.getElementById("back-to-top");
|
||||
$(document).ready(function() {
|
||||
button = document.getElementById("back-to-top");
|
||||
|
||||
window.onscroll = function() {scrollFunction()};
|
||||
window.onscroll = function() {scrollFunction()};
|
||||
|
||||
function scrollFunction() {
|
||||
if (document.body.scrollTop > 300 || document.documentElement.scrollTop > 20) {
|
||||
button.style.right = "1rem";
|
||||
} else {
|
||||
button.style.right = "-2.5rem";
|
||||
function scrollFunction() {
|
||||
if (document.body.scrollTop > 300 || document.documentElement.scrollTop > 20) {
|
||||
button.style.right = "1rem";
|
||||
} else {
|
||||
button.style.right = "-2.5rem";
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue