Created
November 12, 2012 00:49
-
-
Save agustinhaller/4056953 to your computer and use it in GitHub Desktop.
aaa
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Product images scroller | |
| $(".thumbnails-list").delegate(".thumbnail-item", "click", function(event){ | |
| event.preventDefault(); | |
| var thumb_image = $("img", this).attr('src'), | |
| $thumb_image_container = $("img", this), | |
| big_image = $(".product-images-wrapper .displayed-image").attr('src'), | |
| $big_image_container = $(".product-images-wrapper .displayed-image"); | |
| // Now lets switch images | |
| // Hide big one | |
| $big_image_container.fadeOut(500, function(){ | |
| $thumb_image_container.attr('src', big_image); | |
| $(this).attr('src', thumb_image); | |
| $(this).delay(100).fadeIn(500); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment