Ovviamente, funziona.

codice HTML:
$(function)() {
$('div').each(function(){
if($(this).css('overflow') == 'auto'){
$(this).attr('onclick','tua_nome_funzione()')
}
})
});
Grazie mille!