JavaScript import wixData from 'wix-data'; $w.onReady(function () { // 1. Get today's date const today = new Date(); // 2. Define how many images you have in your collection const totalImages = 7; // Change this to the number of images you uploaded // 3. Calculate an index based on the day of the year // This ensures the image only changes when the date changes const dayOfYear = Math.floor((today - new Date(today.getFullYear(), 0, 0)) / 1000 / 60 / 60 / 24); const imageIndex = dayOfYear % totalImages; // 4. Pull that specific image from your CMS wixData.query("DailyImages") .eq("title", imageIndex.toString()) .find() .then((results) => { if (results.items.length > 0) { $w("#dailyImage").src = results.items[0].photo; } }) .catch((err) => { console.log("Error loading daily image:", err); }); });
top of page

WellHealth is a St. Louis-based 501(c)3 nonprofit technology and community development organization.  Our mission is to foster an equitable, healthy, and thriving communities in the Midwest and globally.  We facilitate technology and community development with efforts to promote physical and mental health, and to reduce homelessness, drug and alcohol addiction, and violence.

We promote collaborative development of global innovative technology ecosystem.  We specialize in mental health services, medical training, and research, as well as innovative entrepreneurship investment and acceleration. We develop innovative healthcare delivery systems and promote cross-border collaboration in the healthcare industry and business.

bottom of page