i get this script to custom build some image gallery:
$('#plantas-img a').click(function(){
image = $("<img />").attr("src", $(this).attr("href"));
$("#plantas-img .img_big").html(image);
return false;
})
my html:
<div id="plantas-img" class="product-img">
<div class="img_big">
<img src="plantas/image_1.jpg"/>
</div>
<div class="wrap_thumbs_plantas">
<ul class="thumbs">
<li><a href="plantas/image_1.jpg"><img src="plantas/thumb_image_1.jpg"/></a></li>
<li><a href="plantas/image_2.jpg"><img src="plantas/thumb_image_2.jpg"/></a></li>
<li><a href="plantas/image_1.jpg"><img src="plantas/thumb_image_1.jpg"/></a></li>
<li><a href="plantas/image_2.jpg"><img src="plantas/thumb_image_2.jpg"/></a></li>
<li><a href="plantas/image_1.jpg"><img src="plantas/thumb_image_1.jpg"/></a></li>
<li><a href="plantas/image_2.jpg"><img src="plantas/thumb_image_2.jpg"/></a></li>
<li><a href="plantas/image_1.jpg"><img src="plantas/thumb_image_1.jpg"/></a></li>
<li><a href="plantas/image_2.jpg"><img src="plantas/thumb_image_2.jpg"/></a></li>
<li><a href="plantas/image_1.jpg"><img src="plantas/thumb_image_1.jpg"/></a></li>
<li><a href="plantas/image_2.jpg"><img src="plantas/thumb_image_2.jpg"/></a></li>
</ul>
</div>
</div>
This works fine, but this site have some administrator, so i need to dinamic load inside the .img_big
div the first li
image. Another question is: How to put some FadeIn/FadeOut Effect on this script?