JSF and JQuery

JSF and JQuery

Hello,
i'm stuck with this problem:
I have a href generated by JSF and it puts in onclick some content that sends me to other page.
Example:
<a id="_id1:rptcrontabTable:136:remove" onclick="return oamSubmitForm('_id1','_id1:rptcrontabTable:136:remove',null,[['jobId','136']]);" href="#">


I want to use JQuery like this:
   $(function() {
      $("a[id $= ':remove']").click(function(event) {
         if(!confirm('#{bun.confirm}: #{bun.remove}')) event.preventDefault();
      });
   });



But this doesn't work because onclick of a has already been executed. How can JQuery get before what's in onclick of a element?

Thanks very much in advance