How to trigger JavaScript/jQuery on AJAX-enabled ImageField submit? I'm trying to trigger a JavaScript event when an AJAX-enabled ImageField submit button is clicked. 

I've tried variations on delegate(), submit(), and click(), but no joy. 

This is something similar to what I'm trying:

$('#edit-field-image-und-0-upload-button').mousedown(function () {
  alert('hi');
});


I read the documentation I could find on Drupal's AJAX forms, but haven't found what I'm looking for yet.
I agree with DeeZone that .click() should work.

Try putting that code in a $(document).ready();

Drupal ajaxifies it's stuff on document ready so your code might be executing BEFORE the form gets ajaxified by Drupal.

$(document).ready(function() {
  $('#edit-field-image-und-0-upload-button').click(function () {
  alert('hi');
  });
});