我想在图像上启动一个功能。我将 JQueryThumbGallery 与灯箱一起使用,我想检索图像 ID
我的代码是
<div class='thumbHolder' **data-id="MY-ID"** data-title="<?php echo '<span class=\'io_home\'>'.$row['io'].'</span><br /> '.$row['first_name'].' '.$row['last_name'].'<br/><span class=\'voti_home\'>'.$row['tot_voti'].' VOTI</span>'; ?>">
<a rel="prettyPhoto[ajax]" href="index.php/image/view_image?ajax=true&width=700px&height=450px&id=<?php echo $row['id']; ?>" >
<img class="thumb_hidden" src="<?php echo base_url().'upload/concorso1/thumb/'.$row['url']; ?>" width="151" height="120" alt="<?php echo $row['first_name'].' '.$row['last_name']; ?>" />
</a>
</div>
jquery函数是
function overThumb(i,j){
//function called when mouse over thumb holder (plus returned item number: i = first level, j = second level)
console.log('overThumb: ', i,' , ', j);
}
我需要从我打开的图像中检索 ID(overThumb 功能)。我曾尝试设置 data-id-i 和 data-id-j 但我还没有了解应该如何使用它们。你能帮助我吗?
链接到脚本
http://www.interactivepixel.net/ccThumbGallery/index_grid_horizontal_100percent_buttons.html
谢谢 fc