update
This commit is contained in:
117
footer.php
117
footer.php
@@ -6,7 +6,7 @@
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="icon">
|
||||
<a href="call-to_%2b00449922097788.html"><i class="feather-phone"></i></a>
|
||||
<a href="tel:+977015361805"><i class="feather-phone"></i></a>
|
||||
</div>
|
||||
<div class="text">
|
||||
<h4 class="title">Have Any Questions? Call Us free</h4>
|
||||
@@ -420,6 +420,121 @@
|
||||
|
||||
<!-- JS
|
||||
============================================ -->
|
||||
<!-- contact page button click trasition -->
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
|
||||
const branchData = {
|
||||
thamel: {
|
||||
image: "assets/images/appoinment/01.webp",
|
||||
map: "https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d56517.99208437268!2d85.322709!3d27.705721!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x39eb19075467bfbf%3A0x6b7bdcbb90b8c6ca!2sPathfinder%20International%20Education%20Consultancy!5e0!3m2!1sen!2snp!4v1767857994789!5m2!1sen!2snp",
|
||||
phone: "+977 01 4444444",
|
||||
email: "thamel@pathfinder.com",
|
||||
address: "Thamel, Kathmandu, Nepal"
|
||||
},
|
||||
damauli: {
|
||||
image: "assets/images/appoinment/03.webp",
|
||||
map: "https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d56517.99208437268!2d85.322709!3d27.705721!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x39eb19075467bfbf%3A0x6b7bdcbb90b8c6ca!2sPathfinder%20International%20Education%20Consultancy!5e0!3m2!1sen!2snp!4v1767858202998!5m2!1sen!2snp",
|
||||
phone: "+977 065 560000",
|
||||
email: "damauli@pathfinder.com",
|
||||
address: "Damauli, Tanahun, Nepal"
|
||||
},
|
||||
gorkha: {
|
||||
image: "assets/images/appoinment/01.webp",
|
||||
map: "https://www.google.com/maps/embed?pb=GORKHA_MAP_URL",
|
||||
phone: "+977 064 420000",
|
||||
email: "gorkha@pathfinder.com",
|
||||
address: "Gorkha, Nepal"
|
||||
},
|
||||
australia: {
|
||||
image: "assets/images/appoinment/01.webp",
|
||||
map: "https://www.google.com/maps/embed?pb=AUSTRALIA_MAP_URL",
|
||||
phone: "+61 2 9000 0000",
|
||||
email: "australia@pathfinder.com",
|
||||
address: "Parramatta, NSW, Australia"
|
||||
}
|
||||
};
|
||||
|
||||
const buttons = document.querySelectorAll(".branch-area a[data-branch]");
|
||||
const appImage = document.querySelector(".aapoiment-left-area-thumbnail img");
|
||||
const mapIframe = document.querySelector(".tmp-map-area iframe");
|
||||
const contactBlock = document.querySelector(".tmp-contact-address");
|
||||
|
||||
const phoneEl = document.querySelector(".phone-block p a");
|
||||
const emailEl = document.querySelector(".email-block p a");
|
||||
const addressEl = document.querySelector(".address-block p");
|
||||
|
||||
|
||||
buttons.forEach(button => {
|
||||
button.addEventListener("click", function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
const key = this.dataset.branch;
|
||||
const data = branchData[key];
|
||||
if (!data) return;
|
||||
|
||||
// Fade out
|
||||
appImage.classList.add("branch-fade-out");
|
||||
mapIframe.classList.add("branch-fade-out");
|
||||
contactBlock.classList.add("branch-fade-out");
|
||||
|
||||
setTimeout(() => {
|
||||
|
||||
// Update content
|
||||
appImage.src = data.image;
|
||||
mapIframe.src = data.map;
|
||||
|
||||
phoneEl.textContent = data.phone;
|
||||
phoneEl.href = "tel:" + data.phone.replace(/\s+/g, "");
|
||||
|
||||
emailEl.textContent = data.email;
|
||||
emailEl.href = "mailto:" + data.email;
|
||||
|
||||
addressEl.textContent = data.address;
|
||||
|
||||
// Fade in
|
||||
appImage.classList.remove("branch-fade-out");
|
||||
mapIframe.classList.remove("branch-fade-out");
|
||||
contactBlock.classList.remove("branch-fade-out");
|
||||
|
||||
}, 300);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
appImage.classList.add("branch-fade-out");
|
||||
mapIframe.classList.add("branch-fade-out");
|
||||
contactBlock.classList.add("branch-fade-out");
|
||||
|
||||
setTimeout(() => {
|
||||
|
||||
// Force browser repaint
|
||||
appImage.src = "";
|
||||
appImage.offsetHeight; // force reflow
|
||||
appImage.src = data.image;
|
||||
|
||||
mapIframe.src = data.map;
|
||||
|
||||
phoneEl.textContent = data.phone;
|
||||
phoneEl.href = "tel:" + data.phone.replace(/\s+/g, "");
|
||||
|
||||
emailEl.textContent = data.email;
|
||||
emailEl.href = "mailto:" + data.email;
|
||||
|
||||
addressEl.textContent = data.address;
|
||||
|
||||
requestAnimationFrame(() => {
|
||||
appImage.classList.remove("branch-fade-out");
|
||||
mapIframe.classList.remove("branch-fade-out");
|
||||
contactBlock.classList.remove("branch-fade-out");
|
||||
});
|
||||
|
||||
}, 350);
|
||||
|
||||
</script>
|
||||
|
||||
<script src="assets/js/vendor/jquery.min.js" defer></script>
|
||||
<script src="assets/js/vendor/bootstrap.min.js" defer></script>
|
||||
<script src="assets/js/vendor/waypoint.min.js" defer></script>
|
||||
|
||||
Reference in New Issue
Block a user