How can I put certain images in a div using jquery with a click of a button?
Follow the html:
<div>
<button id="btn2015" class="btn">2015</button>
<button id="btn2014" class="btn">2014</button>
<button id="btn2013" class="btn">2013</button>
<button id="btn2012" class="btn">2012</button>
</div>
<div id="conteudo">
</div>
Depending on each button clicked, the content div will be emptied and the images will be placed according to the button. Here are the names of the images:
imagem_piscina_2015.jpg
imagem_sala_2015.jpg
imagem_escrito_2015.jpg
In addition to these, there are several others with the same names, only the years ending with the different years. How can I make each button, just call the images according to their respective years?