i have this html:
<div class="title"><img class="arrow" src="rightarrow.gif" />Title</div>
i have this click event:
$(document).ready(function () {
$('.title').live('click', function () {
//NEED SOMETHING HERE TO CHANGE SOURCE
$(".arrow").attr("src", "downarrow.gif");
});
});
as you can see i want to change the src attribute of the image. my selector above works, but there are other items on the page with class ="arrow", so i need a way to just select this one instance.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…