Posted By

komposition on 09/29/08


Tagged

js textmate


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

sulfurito
benrudolph
dsntos
wirenaught


jQuery image swap


 / Published in: JavaScript
 

  1. $("#thumbs a").click( function() {
  2. var changeSrc = $(this).attr("href");
  3. $("#target").attr("src", changeSrc);
  4. return false;
  5. });
  6.  

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: Uzbekjon on April 13, 2009

Good script, but you need to read it in its context. Read how to replace images using jquery article to get an understanding of how it all works.

You need to login to post a comment.