单击产品页面侧面的每个缩略图将切换big_image以正常显示该图像。适用于Internet Explorer 9或更低版本以外的任何设备。因此我刚刚添加了一个小jQuery,但仍然没有在任何这些版本上工作。有什么想法吗?
<?php if ($thumb || $images) { ?>
<div class="left">
<div class="image-additional">
<a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>"><img class="side_thumb" src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a>
<?php foreach ($images as $image) { ?>
<a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>"><img class="side_thumb" src="<?php echo $image['thumb']; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a>
<?php } ?>
</div>
</div>
<div id="big_image">
<img width="320" height="320" name="main" src="<?php echo $popup; ?>" alt="">
</div>
<?php } ?>
<script type="text/javascript">
$(document).ready(function(){
$('.image-additional img').click(function() {
var img = $(this).attr('src');
$('#big_image img').attr('src', img);
});
});
</script>