[jQuery] Add onclick attribute to a a link - Is it possible ?

[jQuery] Add onclick attribute to a a link - Is it possible ?


Hello all,
I love jquery but I'm really new to ajax and development (and
english ;-) ).
I want to add the attribute onclick on some link on my page :
I found how to add a title for the link (for example), I can also
change the color and some other things but in fact what I really want
to do is add a onclick "return confirm('sure ?')"
here is what I'm trying to do :
$('.view-field a').attr({ onclick: "return confirm('sure ?')"});
Can someone help me ?
Thanks.
dominique.