How to create a timer to run an HTML click 'class'
So I am very new to JS and I have been messing around with a template file. I have been lucky so far in searching and finding most of my issues, but I don't think I know exactly what to search for in this issue.
Here it is:
There is a picture, that when clicked, runs part of a JS file that changes the background on the website.
the class 'next' is what changes the image. How can I go about creating a timer in my HTML page that will automatically "click" this every 20 seconds. Keeping the actual physical click functionality of the images alive, as well.
<a href="#" class="next"><img src="images/marker_right.png" alt="" class="img"><img src="images/marker_right_active.png" alt="" class="img_act"></a>
Ultimately, I want the background to change by itself if the user does not click on the image, every 20 seconds.