opacity animate problem
opacity animate problem
Hello,
I am new to jquery and excited to be new as well!!
Thanks for reading my first post.
I have a set of thumbnails that when you click, a bigger image will get the src path to a larger image, so the bigger image will change when you click the thumbnails.
My problem is when I use animate, it shows great but if I click a thumbnail and I click another one fast, the animate effect stops working when I click the other thumbnails, here is my code:
- $(function(){
//look for teh images that have the class of gallery with the has selector
$("a:has(img.gallery)").click(function(){
var largePath=$(this).attr("href");
//alert(largePath);
var caption=$(this).attr("title");
//alert(caption);
$("#photo_large").css({opacity:0.0}).attr({src:largePath}).animate({opacity:1.0}, 1000);
$("#caption1").text(caption);
return false;
});
});
Thank you for your time, I am grateful for having this forum