For jQuery 1.7 and later, use .on() and .trigger()
$('button').on('someFunction',function() {
alert('go away!')
});
$('button').click(function(){
$(this).trigger('someFunction');
});
Before jQuery 1.7 we used .bind() method for attaching event handlers (instead of .on()).