fix: infinity
This commit is contained in:
parent
1ee4878530
commit
6837a638d4
15
main.js
15
main.js
@ -12,12 +12,12 @@ function getInTouch(vall) {
|
||||
}
|
||||
|
||||
|
||||
function WhatsgetInTouch(){
|
||||
function WhatsgetInTouch() {
|
||||
window.open(
|
||||
"https://wa.me/919787466226?text=Hi%20KodePilot%20Team%2C%0A%0AI%20came%20across%20your%20website%20and%20would%20like%20to%20know%20more%20about%20your%20Career%20Guidance%20and%20Placement%20support%20services.%20Could%20you%20please%20share%20the%20details%3F%0A%0AThanks%21",
|
||||
"_blank"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function getInZoho() {
|
||||
window.open("https://forms.zohopublic.in/krishnakode1/form/KodePilotRegistrationForm/formperma/A2L8xK6T13A9-s5Kxj8BqRTGsgmpKDHM0DDcZQWye5E");
|
||||
@ -580,17 +580,22 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
counters.forEach(counter => observer.observe(counter));
|
||||
});
|
||||
|
||||
|
||||
// i know it is a bad code but it works 😅
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const track = document.querySelector(".move-slider-animation-box");
|
||||
const container = document.querySelector(".container");
|
||||
let speed = 1;
|
||||
let pos = 0;
|
||||
const normalSpeed = 1;
|
||||
let speed = 20;
|
||||
|
||||
function animate() {
|
||||
pos -= speed;
|
||||
track.style.transform = `translateX(${pos}px)`;
|
||||
|
||||
if (pos <= -100 && speed !== normalSpeed) {
|
||||
speed = normalSpeed;
|
||||
}
|
||||
|
||||
const firstChild = track.firstElementChild;
|
||||
const firstRect = firstChild.getBoundingClientRect();
|
||||
const containerRect = container.getBoundingClientRect();
|
||||
@ -605,4 +610,4 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
}
|
||||
|
||||
animate();
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user