只需要在.fullsizeimage中点击或悬停显示.thumbimage - 不幸的是.attr函数没有运气。在div上点击/悬停显示缩略图
http://jsfiddle.net/CUZBa/ - 小提琴以防万一!
<div class="row">
<div class="fullsizeimage">
<img src="https://www.houseplans.com/img/980e/461-2p1-2520_plan-detail.jpg" />
</div>
<div class="thumbimage"><a href="#"><img src="https://www.houseplans.com/img/85cd/461-2e-2520_plan-detail.jpg" width="100" height="100"></a></div>
<div class="thumbimage"><a href="#"><img src="https://www.houseplans.com/img/872d/461-2alt1-2520_plan-detail.jpg" width="100" height="100"></a></div>
<div class="thumbimage"><a href="#"><img src="https://www.houseplans.com/img/230e/461-2alt2-2520_plan-detail.jpg" width="100" height="100"></a></div>
</div>
<script src="" type="text/javascript">
$('.thumbimage a').on('click hover',function(){
$('.fullsizeimage img').attr('src',$(this).attr('src'));
});
</script>
(你应该把你的事件在A-标签,而不是IMG) –
它简化为$(“thumbimage一个。”) - 以上代码更新,但它没有似乎工作 –