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&w=500&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")); });
Comments
Post a Comment