Javascript 漂亮照片第二图像选择
我在标签中显示了简单字段的第一个位置图像和第二个位置图像,当单击第二个图像时,必须在弹出窗口中打开相同的图像,特定的帖子包含多个图像。因此,当单击第二个图像时,必须查看相同的图像。但是,当单击第二个图像时,第一个图像显示在弹出窗口中。请帮我找出我在以下代码中犯的错误。。。请 指引我Javascript 漂亮照片第二图像选择,javascript,jquery,wordpress,custom-post-type,prettyphoto,Javascript,Jquery,Wordpress,Custom Post Type,Prettyphoto,我在标签中显示了简单字段的第一个位置图像和第二个位置图像,当单击第二个图像时,必须在弹出窗口中打开相同的图像,特定的帖子包含多个图像。因此,当单击第二个图像时,必须查看相同的图像。但是,当单击第二个图像时,第一个图像显示在弹出窗口中。请帮我找出我在以下代码中犯的错误。。。请 指引我 添加每个图像的不同id,如id=“imageMsgnifier1”。。第二个image.id=“imageMsgnifier2”是传递不同的id。我在这里通过了邮局。使用pretto <ul cla
-
添加每个图像的不同id,如id=“imageMsgnifier1”。。第二个image.id=“imageMsgnifier2”是传递不同的id。我在这里通过了邮局。使用pretto
<ul class="gallery clearfix">
<?php $j=0; for($i=0;$i<$count_project_image_count;$i++){ ?>
<li>
<a href="<?php echo get_option('siteurl');?>/wp-content/uploads/<?php echo get_post_meta(get_post_meta($posts['ID'], '_simple_fields_fieldGroupID_1_fieldID_1_numInSet_'.$i, full), '_wp_attached_file', true); ?>" id="imageMagnifier<?php echo $posts['ID']; ?>" rel="prettyPhoto[gallery_image<?php echo $posts['ID']; ?>]"
class="class1" <?php if($j>0){ ?> style="display:none;" <?php } ?> >
<img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php echo get_option('siteurl');?>/wp-content/uploads/<?php echo get_post_meta(get_post_meta($posts['ID'], '_simple_fields_fieldGroupID_1_fieldID_1_numInSet_0', thumbnail), '_wp_attached_file', true); ?>&w=200&h=200&zc=1"/>
</a>
<!-- if image count greater than 1 to display two images in product list -->
<?php if($count_project_image_count>1){ ?>
<a href="<?php echo get_option('siteurl');?>/wp-content/uploads/<?php echo get_post_meta(get_post_meta($posts['ID'], '_simple_fields_fieldGroupID_1_fieldID_1_numInSet_'.$i, full), '_wp_attached_file', true); ?>" id="imageMagnifier<?php echo $posts['ID']; ?>" rel="prettyPhoto[gallery_image1<?php echo $posts['ID']; ?>]" class="class2" <?php if($j>0){ ?> style="display:none;" <?php } ?> >
<img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php echo get_option('siteurl');?>/wp-content/uploads/<?php echo get_post_meta(get_post_meta($posts['ID'], '_simple_fields_fieldGroupID_1_fieldID_1_numInSet_1', thumbnail), '_wp_attached_file', true); ?>&w=200&h=200&zc=1"/>
</a>
<?php } ?>
<!--End of image count greater than 1 to display two images in product list -->
</li>
<?php $j++; } ?>
</ul>