selecting an image in a class
Ok, I'm once again being stupid. So I need a little help.
If I have:
- <fieldset>
- <legend>Payment Method</legend>
- <article name="paymentType" class="paymentType selected" value="<natsPay1>">
- <img src="img/light_bulb_on.png" />
- <p class="mpOption pull-left">Credit Card</p>
- </article>
- <article name="paymentType" class="paymentType" value="<natsPay2>">
- <img src="img/light_bulb_off.png" />
- <p class="mpOption pull-left">Euro Debit Card</p>
- </article>
- <article name="paymentType" class="paymentType" value="<natsPay3>">
- <img src="img/light_bulb_off.png" />
- <p class="mpOption pull-left">Pay by phone</p>
- </article>
- <input id="payType" type="hidden" value="" />
- </fieldset>
You will notice that under each <article> there is an img tag with a graphic of a light bulb turned OFF (except the first/default - where it is ON).
Now, on my CLICK event (tied to the "paymentType" class), how do I set the IMG src to "src=img/lightbulb_off.png" and the one I click on to "src=img/lightbulb_on.png"
I know this is easy, I'm just spacing it. I tried a number of methods at this point. I just need to figure out how to do the select aspect.