Selecting a child image of a clicked element in jQuery
So I have HTML:
<p class="agendaNav"><img class="rightArrow" src="/images/arrowright.png"> WEEK AT A GLANCE</p> <p class="agendaNav"><img class="rightArrow" src="/images/arrowright.png"> MONDAY</p> <p class="agendaNav"><img class="rightArrow" src="/images/arrowright.png"> TUESDAY</p> In jQuery, I want to change the src attribute from ArrowRight.png to the down.png arrow when clicked.
How can I do it?
Here is what I still have:
$('.agendaNav').click(function(event){ $(this).('.rightArrow').attr('src', '/images/arrowdown.png'); }); What am I doing wrong?
Oh, and I only want to change the arrow of the clicked element, not each.
+4
...">