$("p").bind("myEvent", function (event, message1, message2) { alert(message1 + ' ' + message2);});$("p").trigger("myEvent", ["Hello","World!"]);