yoloyoli123 Posted September 11, 2022 Share Posted September 11, 2022 Site URL: https://www.yoloyoli.art/ I have four main colors that I use on my website. I would like to make the color of certain text change every time the page is visited to one of the four colors. I would assume to use an array and have it pick a random from that list and set it to the text color. However, I need help on going about this. Every attempt I made to create an array came with a syntax error. Got any ideas? Thanks! Link to comment
Beyondspace Posted September 14, 2022 Share Posted September 14, 2022 On 9/12/2022 at 12:46 AM, yoloyoli123 said: Site URL: https://www.yoloyoli.art/ I have four main colors that I use on my website. I would like to make the color of certain text change every time the page is visited to one of the four colors. I would assume to use an array and have it pick a random from that list and set it to the text color. However, I need help on going about this. Every attempt I made to create an array came with a syntax error. Got any ideas? Thanks! I imagine that when client visit you site, it always pop-up a modal to pick the color. After picking color, the page will be set the appropriate style. Is it your requirement? BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations) 🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment