javascript - Show GIF images in 9Gag style -


i know how show gif file after clicking jpg file in 9gag.com

i'm using timthumb.php jpg image.

https://code.google.com/p/timthumb/ 

here code below

<div class="images"> <img alt="image title" src="timthumb.php?src=myimage.jpg&amp;w=500&amp;q=100"> </div> 

i want show original image after clicking jpg. can point me out way using jquery or javascripts.

note: image loop there can more 1 image.

really appropriate help.

this can done jquery library.
html

<div class="images">     <img class="thumb" alt="image title" src="http://i.stack.imgur.com/rur4z.png" gif="http://ourbunkers.0catch.com/grunt.gif"/>     <img class="thumb" alt="image title" src="http://i.stack.imgur.com/rur4z.png" gif="http://ourbunkers.0catch.com/grunt.gif"/>     <img class="thumb" alt="image title" src="http://i.stack.imgur.com/rur4z.png" gif="http://ourbunkers.0catch.com/grunt.gif"/> </div> 

javascript

$(".thumb").click( function(){      $(this).attr("src", $(this).attr("gif"));  }); 

http://jsfiddle.net/pp42q/8/


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -