Check out this interesting discussion about displaying and hiding divs at specific time intervals using jQuery on the page here.
The script mentioned is designed to loop through DIVs, showing one after the other while hiding the rest. It's titled "Loop through divs every 10 seconds."
Although this script functions well, there is a need to select a specific DIV by clicking on a designated button as well.
Within the context of three DIVs labeled 1-2-3 (with the active one in red), the Loop Script alternates between them correctly. However, when clicking on 2, DIV Nr. 2 should become the active one (then continue with 3 - 1 - 2...).
To simplify: How can I indicate to the script to set "counter = 3" upon clicking button 3?
For more insight and examples, visit these links: timer-based script and click-triggered version.
If you can explain it to someone who is not very familiar with JavaScript (like me!), that would be greatly appreciated!
Thank you!