画像オーバーで機能を起動したい。ライトボックスで 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