Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have a selection of quotes and i want them to automatically change qoute whilst the user is browsing the site how would i go about this?

What I have tried:

I have no idea how to get started with this idea so nothing as of yet.
Posted
Updated 6-Aug-18 6:39am
Comments
MadMyche 6-Aug-18 11:49am    
Language you are going to be using; C#, PHP, javascript?
Member 13939704 6-Aug-18 12:11pm    
Javascript

1 solution

What you are looking for is a Random Text Selector.

Google brought this up when I searched for it: Select Random LI element[^]

If it were me, I would go through the code and see how it works, then tinker around with it. I would then see if I could abuse the ability of jquery/javascript to parse the DOM and place the random content in non-visible elements (probably via CSS and a UL-LI).

Once my skills developed, I would put the data into external files (content1, content2) and use that same random generator to select one of them external files to get the random content.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900