JS update div boxes automaticly by date | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

JS update div boxes automaticly by date

Any idea how i can update my div boxes by date? Every 3.5 days the top box should move to the bottom or it simple shorts all the boxes by date would be ideal. i would greatly appriciate any directions/solutions https://codepen.io/Nassocci/pen/JjGwdXM

20th Jul 2020, 6:04 AM
Sam CiPkt
Sam CiPkt - avatar
1 Answer
+ 4
Well, you could hard code the first day into the websites code and then use the date Object to find the current date and calculate the difference in milliseconds, convert it to days and then use JavaScript to know how much the box should move🤷🏻‍♂️ (Not as complicated as it sounds but not that easy either)
26th Jul 2020, 11:32 PM
Vachila64☕
Vachila64☕ - avatar