Replace text in div when image is clicked

Posted by Adam on Stack Overflow See other posts from Stack Overflow or by Adam
Published on 2010-04-07T02:13:49Z Indexed on 2010/04/07 2:23 UTC
Read the original article Hit count: 320

Filed under:
|
|

Hello,

I'm trying to replace certain text inside the div "info" when an image (which serve as links) is clicked. I'm just unsure of what methods could do this. I would prefer this be jquery.

My code so far looks like:

<div class="info">
<p>I would like this text replaced</p>
<script>
</script>
</div><!--end info-->


<li><a href="1.jpg"><img src="1-s.png" width="55" height="55" alt="" class="latest_img" /></a><p>Replace the div "info" text with the text here when clicked on</p></li>

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about text