I am working around a simple jQuery script that is changing the backgroud color of an element when clicked.
Here is my code:
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<div class="radio">Text1</div>
<div class="radio">Text2</div>
<div class="radio">Text3</div>
<div class="radio">Text4</div>
I want the following to happen:
I click on "Text1" and this div is changing his background color to red and stay red.
I click on "Text2" and the background color of "Text1" is going back to white and then the background color of "Text2" is going and stay red.
I hope i give you a good description.
Can you help me make it ?
Thanks in advance!