When "#gallery is loaded, have the background image set to the first link in the list. "When "#trigger" is clicked, I want the background image of "#gallery" to be changed to the next sibling link. (Let me know if they should not be listed in the way that they are)
<div id="gallery">
<ul>
<li><a href="images/1.jpg"></a></li>
<li><a href="images/2.jpg"></a></li>
<li><a href="images/3.jpg"></a></li>
</ul>
</div>
<div id="trigger">Trigger</div>
I tried making a variable for the location of the link, and using it for the background of "#gallery" and then creating a click function event for "#trigger" where it changes the value of the variable to the next link.
This is my first post, so I appreciate any feedback.