Prova così
Codice PHP:
$('div img').click(function(){
    
alert($('div img').index(this) + 1
});