Adds jquery formatting to event handlers