Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add icream image at scroll button #839

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added cone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 22 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@

<button id="backToTop" style="font-size: 30px; font-weight: bold;">&#8673;</button>

<div class="scroll-progress" id="scrollProgress"></div>

<!-- Header Starts Here -->
<header class="header">

Expand Down Expand Up @@ -1497,6 +1499,20 @@ <h2>Billing Address</h2>
opacity: 0;
}
}
.scroll-to-top {
position: fixed;
bottom: 20px; /* Distance from the bottom of the page */
right: 40px; /* Distance from the right of the page */
background-color: transparent; /* Transparent background */
border: none; /* Remove border */
cursor: pointer; /* Change cursor to pointer */
z-index: 100; /* Ensure it’s above other content */
}

.scroll-to-top img {
width: 60px; /* Adjust size of the cone image */
height: auto; /* Maintain aspect ratio */
}

</style>
<script>
Expand Down Expand Up @@ -1648,8 +1664,12 @@ <h2 data-aos="zoom-out-down" data-aos-duration="1200" data-aos-delay="200">Share

</section>

<button id="scrollToTop" class="scroll-to-top">
<img src="cone.png" alt="Scroll to Top" />
</button>

<script>
//chatbot added here!
//chatbot added here!
window.embeddedChatbotConfig = {
chatbotId: "oSyGH_33H4whnPVyaVVwa",
domain: "www.chatbase.co"
Expand Down Expand Up @@ -1832,6 +1852,7 @@ <h3>Follow Us</h3>
<div class="gtranslate_wrapper"></div>
<script>window.gtranslateSettings = {"default_language":"en","detect_browser_language":true,"wrapper_selector":".gtranslate_wrapper"}</script>
<script src="https://cdn.gtranslate.net/widgets/latest/float.js" defer></script>
<script src="script2.js"></script>
</body>

</html>
20 changes: 20 additions & 0 deletions script2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
document.addEventListener("DOMContentLoaded", function() {
const scrollToTopButton = document.getElementById("scrollToTop");

// Show button when scrolling down
window.onscroll = function() {
if (document.body.scrollTop > 200 || document.documentElement.scrollTop > 200) {
scrollToTopButton.style.display = "block";
} else {
scrollToTopButton.style.display = "none";
}
};

// Scroll to top functionality
scrollToTopButton.addEventListener("click", function() {
window.scrollTo({
top: 0,
behavior: "smooth" // Smooth scrolling
});
});
});